| Posted by Markus Ernst on 02/15/06 14:48 
Hi
 In my application I have lots of require statements that include files
 residing in the same directory:
 
 index.php requires:
 require_once($_SERVER['DOCUMENT_ROOT']."/modules/cms/classes/page.php");
 
 page.php requires:
 require_once("common_functions.php");
 
 Now I try to install the application on a PHP5 server (Apache), and this
 does not work anymore.
 
 In the PHP4 -> PHP5 migration chapter of the manual I did not find any
 notes on a change of the require/include behaviour, not checking the
 directory of the calling file anymore; nor did I find it googling. So I
 am not sure if it is an undocumented migration issue or just a setting.
 
 I understand that I can use:
 require_once(dirname(__FILE__)."/common_functions.php");
 
 But this means rewriting the whole application. Is there a way to change
 this behaviour via ini_set()? (As I am in a shared hosting environment I
 have no direct access to the php.ini.)
 
 Thanks for hints
 Markus
  Navigation: [Reply to this message] |