nested include/require not working php5.2
Suddenly happened to my scripts, some includes are not working after reconfiguring the server. According to this site w/c encountered the same issue nested includes don’t work in php5.2
I am not able to use includes or requires in nested files using php 5.2.3
(osx)Including or Requiring files directly works.
Including files, that also have includes in them, does not.
Say you have this…
-TopDirectory
–index.php (contains include(”includes/top.php”); )
–includes (folder)
—config.php (contains echo “crap”; )
—top.php (contains include(”config.php”); )When you load the index.php file you would expect the word “crap” to show,
but it does not. I think the getcwd is staying specific to the top folder,
so the path stays the same throughout.
This does not happen in 5.1.6
Is there a fix for this or is it PHP causing the problem?
–
Mike Yrabedra B^)>




June 30th, 2008 at 11:45 pm
juz recently a friend found a way to solve this. If you could edit the php.ini change this line
allow_url_include = On
and you’re good to go