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("c ommon_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(di rname(__FILE__) ."/common_function s.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
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("c ommon_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(di rname(__FILE__) ."/common_function s.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
Comment