#27603 [Com]: incorrect appying open_basedir
| From: | mak123 at poczta dot onet dot pl | Date: | Wed, 24 Mar 2004 09:55:59 +0000 |
| Subject: | #27603 [Com]: incorrect appying open_basedir | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-56751@lists.php.net to get a copy of this message | ||
ID: 27603
Comment by: mak123 at poczta dot onet dot pl
Reported By: pk at nodex dot ru
Status: Open
Bug Type: *General Issues
Operating System: Solaris 9
PHP Version: 4CVS-2004-03-15
New Comment:
the same problem
PHP 4.3.4
Apache 1.3.29
linux 2.4.20, RH9
PHP Warning: Unknown(): open_basedir restriction in effect.
File(<file>) is not within the allowed path(s): (<restriction>) in
Unknown on line 0
every virtual in httpd.conf has only one entry (no .htaccess files):
php_admin_value open_basedir
PHP config: './configure' '--with-config-file-path=/etc'
'--with-apache=../apache_1.3.29' '--enable-force-cgi-redirect'
'--enable-discard-path' '--enable-safe-mode' '--with-exec-dir'
'--with-zlib' '--with-jpeg' '--with-jpeg-dir=/usr/local/libjpeg'
'--with-gd' '--with-mysql=/usr/local/mysql'
'--with-mysql-sock=/tmp/mysql.sock' '--with-regex=php'
'--with-openssl=/usr/local/ssl' '--with-gettext' '--with-xml'
'--with-imap=../imap-2002d' '--disable-ipv6' '--with-db4'
'--enable-exif' '--enable-ftp' '--enable-mcrypt'
Previous Comments:
------------------------------------------------------------------------
[2004-03-18 02:45:54] pk at nodex dot ru
Hello!
PHP 4.2.3 is workeng fine with this configuration.
Configure:
CC="gcc" \
CXX="gcc" \
CFLAGS="-I/usr/local/sfio/include -mcpu=v9 -mtune=ultrasparc" \
CXXFLAGS="-I/usr/local/sfio/include -mcpu=v9 -mtune=ultrasparc " \
CPPFLAGS="-I/usr/local/sfio/include -mcpu=v9 -mtune=ultrasparc " \
LDFLAGS="-lstdc++ -lstdio -lsfio -liconv -L/usr/local/mnogosearch/lib
-lmnogosearch -ludmsearch" \
EXTRA_LIBS="-lstdc++ -lstdio -lsfio -liconv
-L/usr/local/mnogosearch/lib -lmnogosearch -ludmsearch" \
./configure \
--with-apache=/usr/home/export/compile/apache/apache \
--with-mod_charset \
--with-pgsql=/usr/local/pgsql \
--disable-debug \
--enable-calendar \
--enable-inline-otimization \
--with-zlib \
--with-gd=/usr/local \
--with-jpeg-dir=/usr/local/lib \
--with-png-dir=/usr/local/lib \
--with-xpm-dir=/usr/lib \
--with-freetype-dir=/usr/local \
--with-zlib-dir=/usr/lib \
--with-freetype-dir=/usr/local/freetype2 \
--enable-wddx \
--with-curl \
--with-expat \
--enable-trans-sid \
--with-iconv \
--enable-xslt \
--with-xslt-sablot \
--with-imap \
--with-imap-ssl \
--with-openssl=/usr/local/ssl \
--with-mnogosearch=/usr/local/mnogosearch \
--enable-dbase \
--with-mysql=/usr/local/mysql
I`m setting in httpd.conf for each vhost:
php_admin_flag safe_mode on
php_admin_flag track_vars on
php_admin_value doc_root
php_admin_value open_basedir
php_admin_value safe_mode_exec_dir
php_admin_value upload_tmp_dir
php_admin_value session.save_path
php_admin_value max_execution_time 60
php_admin_value upload_max_filesize 3145728
My system is Solaris 9\01 with lastest patches.
------------------------------------------------------------------------
[2004-03-16 11:55:04] sniper@php.net
Are you sure you just haven't misconfigured something?
Some stray .htaccess file somewhere in there?
And we can not reproduce this without knowing how you
a) configured PHP (the ./configure line you used)
b) What you have in your httpd.conf / .htaccess files?
The ini leaking is really fixed in latest CVS and that bug definately
exists in 4.2.3 too.
Get fresh Apache sources (1.3.27 is way too old already, get the
latest which is 1.3.29) and recompile PHP. Make sure you stop / start
apache properly, restart does NOT work.
------------------------------------------------------------------------
[2004-03-16 08:08:20] pk at nodex dot ru
Hello,
[16-Mar-2004 14:34:21] PHP Warning: (null)(): Failed opening
'/usr/hosting/autod/script/shisha.php' for inclusion
(include_path='.:/us
r/local/lib/php') in Unknown on line 0
[16-Mar-2004 14:34:22] PHP Warning: Unknown(): open_basedir
restriction in effect. File(/usr/hosting/autod/script/shisha.php) is
not w
ithin the allowed path(s): (/usr/hosting/cheleba) in Unknown on line 0
[16-Mar-2004 14:34:22] PHP Warning:
Unknown(/usr/hosting/autod/script/shisha.php): failed to open stream:
Not owner in Unknown on line
0
[16-Mar-2004 14:34:22] PHP Warning: (null)(): Failed opening
'/usr/hosting/autod/script/shisha.php' for inclusion
(include_path='.:/us
r/local/lib/php') in Unknown on line 0
[16-Mar-2004 14:34:28] PHP Warning: Unknown(): open_basedir
restriction in effect. File(/usr/hosting/autod/script/shisha.php) is
not w
ithin the allowed path(s): (/usr/hosting/johnpp) in Unknown on line 0
[16-Mar-2004 14:34:28] PHP Warning:
Unknown(/usr/hosting/autod/script/shisha.php): failed to open stream:
Not owner in Unknown on line 0
Script /usr/hosting/autod/script/shisha.php is auto_prepend_file.
I think PHP is inheriting that value from pervions vhost on one child.
------------------------------------------------------------------------
[2004-03-15 12:08:52] pk at nodex dot ru
Sorry, but bug is not fixed.
[15-Mar-2004 20:09:02] PHP Warning: main(): open_basedir restriction
in effect. File(/includes/header.php) is not within the allowed p
ath(s): (/usr/hosting/johnpp) in
/usr/hosting/autod/html/apedia/law/15.php on line 4
[15-Mar-2004 20:09:02] PHP Warning: main(/includes/header.php): failed
to open stream: Not owner in /usr/hosting/autod/html/apedia/law
/15.php on line 4
[15-Mar-2004 20:09:02] PHP Fatal error: main(): Failed opening
required '/includes/header.php'
(include_path='/usr/hosting/jafi/html/i
nc') in /usr/hosting/autod/html/apedia/law/15.php on line 4
No i`m using lastest snapshot.
And this bug return again.
------------------------------------------------------------------------
[2004-03-15 07:38:46] sniper@php.net
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27603
--
Edit this bug report at http://bugs.php.net/?id=27603&edit=1