ID: 33215
User updated by: soenke at city-map dot de
Reported By: soenke at city-map dot de
Status: Open
Bug Type: Safe Mode/open_basedir
Operating System: FC2/3
PHP Version: 4CVS-2005-06-01 (stable)
New Comment:
Got it:
It's somehow related to safe_mode. I hat the safe_mode directives in an
Apache <Directory> directive:
<Directory /usr/local/httpd/htdocs>
php_admin_flag safe_mode_gid On
php_admin_flag safe_mode On
</Directory>
That does _NOT_ work.
After commenting out the the <Directory> like this:
#<Directory /usr/local/httpd/htdocs>
php_admin_flag safe_mode_gid On
php_admin_flag safe_mode On
#</Directory>
it works. Now the PHP flags are in the global Apache config.
But that's a strange behaviour, too, isn't it?
Previous Comments:
------------------------------------------------------------------------
[2005-06-09 14:22:54] soenke at city-map dot de
Bug reopened. This issue remains with new ECC RAM.
------------------------------------------------------------------------
[2005-06-06 13:15:32] soenke at city-map dot de
Thx for your attention.
Yes, I tried the Apache/PHP binaries from Fedora, too. Exactly the same
issue. I'm getting the suspicion that it's a memory fault. I'll report
the result here and reopen the bug if the bug remains with new RAM.
------------------------------------------------------------------------
[2005-06-04 01:06:48] [EMAIL PROTECTED]
Have you tried by using the Fedora provided Apache2 (the binary rpm)??
As I can NOT reproduce this with it.
------------------------------------------------------------------------
[2005-06-01 23:01:20] soenke at city-map dot de
Description:
------------
I discovered the strange behaviour of PHP4 that the open_basedir
settings of several vhosts are leaking between each other.
PHP configure line:
'./configure' \
'--with-apxs2=/usr/sbin/apxs' \
'--prefix=/usr' \
'--with-mysql=/usr' \
'--enable-safe-mode' \
'--enable-trans-sid' \
'--with-jpeg-dir=/usr' \
'--with-gd' \
'--with-zlib-dir=/usr' \
'--with-freetype-dir=/usr' \
Apache line:
"./configure" \
"--enable-layout=RedHat" \
"--enable-mods-shared=most" \
"--enable-module=ssl" \
"--enable-ssl" \
"--with-ssl=/usr" \
"--enable-so" \
It's a mass-hosting Apache 2.0.54 server with many vhosts running the
confixx tool. Here an example of 2 vhosts (generated by confixx):
<VirtualHost xxx:80>
ServerName xxx.de
ServerAlias xxxx
DocumentRoot /usr/local/httpd/htdocs/web405/html
SuexecUserGroup web405 web405
php_admin_value open_basedir
/usr/local/httpd/htdocs/web405/html/:/usr/local/httpd/htdocs/web405/phptmp/:/usr/local/httpd/htdocs/web405/files/:/usr/local/httpd/htdocs/web405/atd/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir
/usr/local/httpd/htdocs/web405/phptmp/
</VirtualHost>
<VirtualHost xxx:80>
ServerName xxx
ServerAlias xxx
DocumentRoot /usr/local/httpd/htdocs/web309/html
SuexecUserGroup web309 web309
php_admin_value open_basedir
/usr/local/httpd/htdocs/web309/html/:/usr/local/httpd/htdocs/web309/phptmp/:/usr/local/httpd/htdocs/web309/files/:/usr/local/httpd/htdocs/web309/atd/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir
/usr/local/httpd/htdocs/web309/phptmp/
<Directory "/usr/local/httpd/htdocs/web309/html/rsh">
Options FollowSymLinks SymLinksIfOwnerMatch
</Directory>
</VirtualHost>
The /usr/local/httpd/htdocs path is a real directory, no symlinks.
Now I open one of these virtual hosts via web-browser. That works. But
if I try to open the second vhost:
Warning: Unknown(): open_basedir restriction in effect.
File(/usr/local/httpd/htdocs/web405/html/index.php) is not within the
allowed path(s):
(/usr/local/httpd/htdocs/web309/html/:/usr/local/httpd/htdocs/web309/phptmp/:/usr/local/httpd/htdocs/web309/files/:/usr/local/httpd/htdocs/web309/atd/)
in Unknown on line 0
Warning: Unknown(/usr/local/httpd/htdocs/web405/html/index.php): failed
to open stream: Operation not permitted in Unknown on line 0
Warning: (null)(): Failed opening
'/usr/local/httpd/htdocs/web405/html/index.php' for inclusion
(include_path='.') in Unknown on line 0
The second vhost uses the open_basedir settings from the first one.
That's really strange.
I tested this with PHP4.3.10/11 and the latest CVS snapshot. I upgraded
the Fedora distribution and recompiled Apache+PHP. No success. Now I
really didn't know what to do any more and so opened this bug report.
If you need more information or debugging it's no problem since it's no
production system yet.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33215&edit=1