Hi all & great to find this forum in an hour of need :eek:
I have searched through existing posts for open_basedir problems but the problems and responses do not address this particular one.
We have had scripts running perfectly for the past two weeks but they failed suddenly yesterday for no apparent reason. Vbulletin is still working in the same web space.
The web host said that they tightened up on security but " all we did was to turn off register_globals and print_errors in php.ini"
The error log shows the first four errors when it tries to run menu.php:
opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/paradise:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/paradise/public_html/php/menu.php on line 152
opendir(/): failed to open dir: Operation not permitted in /home/paradise/public_html/php/menu.php on line 152
readdir(): supplied argument is not a valid Directory resource in /home/paradise/public_html/php/menu.php on line 154
closedir(): supplied argument is not a valid Directory resource in /home/paradise/public_html/php/menu.php on line 223
Lines 151 & 152 are:
if ( !chdir( $this_dir ) ) error_log("unable to chdir");
$handle = opendir( $this_dir );
Line 154:
while ( false !== ( $file = readdir( $handle ) ) ) {
Line 223:
closedir( $handle );
In tests, scripts work fine when they are referenced in php pages as 'php/menu.php'
They do not work when referenced as '../php/menu.php', which was working and should work
I haven't got a clue what might have caused this. Vbulletin is working fine.
This is beginning to worry us, so any help you can give would be really appreciated. We are mere beginners at php, so please bear that in mind.
Edit:
Uh oh, I think I posted in the wrong forum. Sorry about that. If any helpful mod/admin wants to move the thread that would be great :o
Edit 2:
Solevd it by reading the great material on here. Used a .htaccess solution.
Thanks all - this forum is an excellent resource.
UK betting forum