From: wolfram at schlich dot org Operating system: Linux 2.2.16 i586 PHP version: 4.4.0 PHP Bug Type: Safe Mode/open_basedir Bug description: open_basedir restriction in effect although paths are set correctly
Description: ------------ Warning: touch(): open_basedir restriction in effect. File(/tmp/f5_test) is not within the allowed path(s): (/home/sites/site15/:/tmp) in /home/sites/site15/web/write_tmp.php on line 3 Warning: fopen(): open_basedir restriction in effect. File(/tmp/f5_test) is not within the allowed path(s): (/home/sites/site15/:/tmp) in /home/sites/site15/web/write_tmp.php on line 4 Warning: fopen(/tmp/f5_test): failed to open stream: Operation not permitted in /home/sites/site15/web/write_tmp.php on line 4 Warning: fwrite(): supplied argument is not a valid stream resource in /home/sites/site15/web/write_tmp.php on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /home/sites/site15/web/write_tmp.php on line 6 Reproduce code: --------------- --8<--[ write_tmp.php ]--8<-- <?php $tmpfile = "/tmp/f5_test"; touch($tmpfile); $fp = fopen("$tmpfile","w"); fwrite($fp, "test ...."); fclose($fp); ?> --8<--[ httpd.conf ]--8<-- <DirectoryMatch "/home/sites/site15/"> ## doesn't work php_admin_value open_basedir /home/sites/site15/:/tmp ## also doesn't work # php_admin_value open_basedir / ## works, but is not what's desired # php_admin_value open_basedir none </DirectoryMatch> --8<-- Also tried to set open_basedir within the VirtualHost, didn' t work either. Expected result: ---------------- no errors Actual result: -------------- open_basedir errors -- Edit bug report at http://bugs.php.net/?id=34656&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34656&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34656&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34656&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34656&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34656&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34656&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34656&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34656&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34656&r=support Expected behavior: http://bugs.php.net/fix.php?id=34656&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34656&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34656&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34656&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34656&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34656&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34656&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34656&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34656&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34656&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34656&r=mysqlcfg