Important Notice:
Two sections of this forum are available only to registered customers. In order to receive access to the Customer Forums and ResellerCentral Forums, you must first register on these forums or login to your existing forum account. If you are an existing HostNine customer, be sure to register using the email address on file for your billing profile.
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I'm moving scripts over and had been using
$_SERVER['DOCUMENT_ROOT'] as a starting point for things like require_once(). On Host9, using DOCUMENT_ROOT results in a failure to include because php5 won't go outside of its '/' world which is /www document root is: DOCUMENT_ROOT /usr/local/apache/htdocs doing require_once ($_SERVER['DOCUMENT_ROOT'] . '/scripts/config.php'); fails with 'no such file or directory'. Using $_SERVER['SCRIPT_FILENAME'] and pulling the path from that.. Is this a configuration issue with php5? Should document_root be setup to give a path valid for requires/includes ? Brian |
|
#2
|
|||
|
|||
|
Viewing the settings using phpinfo in one of my sites shows the setting for 'DOCUMENT_ROOT' being '/home/user/public_html' (where user is my account username) which looks OK to me.
Is the script you're trying to use in the public_html folder? Last edited by colt45; 06-17-2007 at 02:18 PM. Reason: edit |
|
#3
|
|||
|
|||
|
Quote:
Brian |
|
#4
|
|||
|
|||
|
After having the site go live (ie dns changes) DOCUMENT_ROOT is now pointing
at the correct path (one that can be used with require() ). When using ip/~user - document_root is set to /usr/local/apache/htdocs Which means - I didn't have to update all those scripts... argggg - well, I picked a small site for the first test! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I need a blogs to work on php5 | zanass | Reseller Hosting | 6 | 06-04-2008 11:34 PM |
| PHP5 / Zend | Liam | Web Hosting | 5 | 03-07-2007 08:09 PM |





Linear Mode

