#34656 [Opn->Fbk]: open_basedir restriction in effect although paths are set correctly

From: Date: Tue, 27 Sep 2005 17:53:27 +0000
Subject: #34656 [Opn->Fbk]: open_basedir restriction in effect although paths are set correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-85668@lists.php.net to get a copy of this message
 ID:               34656
 Updated by:       sniper@php.net
 Reported By:      wolfram at schlich dot org
-Status:           Open
+Status:           Feedback
 Bug Type:         Safe Mode/open_basedir
 Operating System: Linux 2.2.16 i586
 PHP Version:      4.4.0
 New Comment:

Give feedback when you have some..


Previous Comments:
------------------------------------------------------------------------

[2005-09-27 19:47:49] wolfram at schlich dot org

thanks! will do.

------------------------------------------------------------------------

[2005-09-27 19:27:01] sniper@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Something related to open_basedir and the paths was just fixed. Give it
an hour or two.


------------------------------------------------------------------------

[2005-09-27 19:24:09] wolfram at schlich dot org

sorry, I cannot use anything other than php4 on that machines.
they are used for webhosting, the customers depend on php4.
thanks.

------------------------------------------------------------------------

[2005-09-27 19:09:06] sniper@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



------------------------------------------------------------------------

[2005-09-27 12:44:53] wolfram at schlich dot org

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 this bug report at http://bugs.php.net/?id=34656&edit=1


Thread (22 messages)

« previous php.bugs (#85668) next »