View Single Post
  #406  
Old 09-24-2002, 08:30 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Some of you don't understand how the path settings are working, so I made a little tutorial to help you understand better.
First, create a file with the content:
[high]<?php phpinfo(32); ?>[/high]
Save it as info.php and upload it to your /forum folder.
When you open info.php in your browser, you will see there a list of env options set as default by your host.
One of them is called _SERVER["PATH_TRANSLATED"]. That's what you are looking for. The path to your folder.

Now, open vbHL index.php file and locate this code segment at the top:
chdir('[high]/wwwroot/test[/high]');
Replace the [high]/wwwroot/test[/high] path with your actual full server path.

Let's suppose your full server path to your forums (where global.php is located) is:
chdir('/home/test/htdocs/forum');
or
chdir('c:/apache/htdocs/forum'); (for windows users)

The chdir function changes the path the the correct location of your global.php file, if you call it from a different location, like it's the case for vbHome (lite).
Example:
chdir('c:/apache/htdocs/forum');
In the example above, if you place the index.php file in [high]/htdocs[/high] folder, it will still look for global.php in [high]/forum[/high] because chdir does the job for you and relocate the exact place where to look for the file (global.php).

The require function let know that global.php file is needed.
The dot in front of [high]/global.php[/high] (in require function) let know there is a link to either chdir folder or actual folder.

Adjust the correct path in your vbHL index.php file, and everything will work as it's suppose to.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01026 seconds
  • Memory Usage 1,766KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete