#19292 [Com]: random error: open_basedir restriction in effect. File is in wrong directory
| From: | david at ols dot es | Date: | Sat, 22 Feb 2003 21:04:12 +0000 |
| Subject: | #19292 [Com]: random error: open_basedir restriction in effect. File is in wrong directory | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-33935@lists.php.net to get a copy of this message | ||
ID: 19292
Comment by: david at ols dot es
Reported By: tnowak at triger dot com dot pl
Status: Feedback
Bug Type: Apache related
Operating System: linux
PHP Version: 4.2.3,4.3.0
New Comment:
4.3.1 when running squirrelmail 1.2.11 gives this errors:
[22-Feb-2003 20:56:15] PHP Warning: main() [<a
href='http://www.php.net/function.main'>function.main</a>]:
open_basedir restriction in effect.
File(/usr/local/http-docs/common/lib/DB.php) is not within the allowed
path(s): (/usr/local/lib/php) in
/usr/local/http-docs/common/webmail/functions/db_prefs.php on line 35
[22-Feb-2003 20:56:15] PHP Warning: main(DB.php) [<a
href='http://www.php.net/function.main'>function.main</a>]:
failed to
create stream: Not owner in
/usr/local/http-docs/common/webmail/functions/db_prefs.php on line 35
[22-Feb-2003 20:56:15] PHP Fatal error: main() [<a
href='http://www.php.net/function.main'>function.main</a>]:
Failed
opening required 'DB.php'
(include_path='./:/usr/local/http-docs/common/lib:/usr/local/lib/php:/usr/local/http-docs/common/lib/phpwhois')
in /usr/local/http-docs/common/webmail/functions/db_prefs.php on line
35
Previous Comments:
------------------------------------------------------------------------
[2003-02-18 13:20:52] aw at mittwaldmedien dot de
Now i tested the http://snaps.php.net/php4-STABLE-latest.tar.gz
from today.
same problem like before.
i call the vhost 'www.domain1.de', after that i call a second vhost
from the same server with 'www.domain2.de'.
Now i get the error:
Warning: Unknown(): open_basedir restriction in effect.
File(/home/www/web8/typo3_src-3.5.0/typo3/index.php) is not within the
allowed path(s): (/home/www/confixx/) in Unknown on line 0
www.domain1.de has the base dir: /home/www/confixx/
www.domain2.de hast the base dir: /home/www/web8/
the funny thing for me is, that i have servers with php 4.2.3 witch i
selfcompiled and they work without that problem.
------------------------------------------------------------------------
[2003-02-18 09:31:41] aw at mittwaldmedien dot de
after one hour the same problem comes up.
the funny thing is, that we have a second machine with suse 8.1, same
apache version and there it works.
so i copied the libphp.so from one machine to the other.
it doesn't help.
Has someone found a working workaround ?????
------------------------------------------------------------------------
[2003-02-18 04:08:21] aw at mittwaldmedien dot de
We have the same Problem, like described above.
On one of our system the Error comes up sometimes.
We deleted the source, untared it again and compiled it the 'different'
configure options.
Now it works !!!!
Is it possible that there some problems with the configure options,
when they are not in the korrekt order or something like this.
This are the configure Options there it makes sometimes the error:
./configure --prefix=/usr/share --datadir=/usr/share/php
--bindir=/usr/bin --libdir=/usr/share --includedir=/usr/include
--with-_lib=lib --with-config-file-path=/etc --disable-debug
--enable-bcmath --enable-calendar --enable-ctype --enable-dbase
--enable-discard-path --enable-exif --enable-filepro
--enable-force-cgi-redirect --enable-ftp --enable-gd-imgstrttf
--enable-gd-native-ttf --enable-inline-optimization
--enable-magic-quotes --enable-shmop --enable-sigchild --enable-sysvsem
--enable-sysvshm --enable-trans-sid --enable-versioning --enable-wddx
--enable-yp --with-bz2 --with-dom=/usr/include/libxml2 --with-ftp
--with-gdbm --with-gettext --with-gmp --with-imap=yes
--with-jpeg-dir=/usr --with-ldap=yes --with-mcal=/usr --with-mcrypt
--with-ndbm --with-snmp --with-tiff-dir=/usr --with-xml
--with-xpm-dir=/usr/X11R6 --with-openssl --with-curl --with-imap-ssl
--with-mm --with-apxs=/usr/sbin/apxs --enable-discard-path
--enable-sockets --enable-track-vars=yes
--with-exec-dir=/usr/local/typo3sh/bin --with-gd=/usr/local/typo3sh
--with-gettext --with-jpeg-dir --with-mysql=/usr --with-png-dir
--with-tiff-dir --with-ttf=/usr/local/typo3sh --with-zlib=yes
and this is my 'working version.
./configure --prefix=/usr/share --datadir=/usr/share/php
--bindir=/usr/bin --libdir=/usr/share --includedir=/usr/include
--with-_lib=lib --with-config-file-path=/etc --disable-debug
--enable-bcmath --enable-calendar --enable-ctype --enable-dbase
--enable-discard-path --enable-exif --enable-filepro
--enable-force-cgi-redirect --enable-ftp --enable-gd-imgstrttf
--enable-gd-native-ttf --enable-inline-optimization
--enable-magic-quotes --enable-shmop --enable-sigchild --enable-sysvsem
--enable-sysvshm --enable-trans-sid --enable-versioning --enable-wddx
--enable-yp --with-bz2 --with-dom=/usr/include/libxml2 --with-ftp
--with-gdbm --with-gettext --with-gmp --with-imap=yes
--with-jpeg-dir=/usr --with-ldap=yes --with-mcal=/usr --with-mcrypt
--with-ndbm --with-qtdom=/usr/lib/qt2 --with-snmp --with-tiff-dir=/usr
--with-xml --with-xpm-dir=/usr/X11R6 --with-openssl --with-curl
--with-imap-ssl --with-mm --with-apxs=/usr/sbin/apxs
--enable-discard-path --enable-sockets --enable-track-vars=yes
--with-exec-dir=/usr/local/typo3sh/bin --with-gd=/usr/local/typo3sh
--with-gettext --with-jpeg-dir --with-mysql=/usr --with-png-dir
--with-tiff-dir --with-ttf=/usr/local/typo3sh --with-xml
--with-zlib=yes
maybe it helps to reproduce the problem and finding the bug.
------------------------------------------------------------------------
[2003-02-15 17:10:45] sniper@php.net
Patch can be found here:
http://cvs.php.net/diff.php/php4/main/main.c?login=2&r1=1.512.2.9&r2=1.512.2.10&ty=u
(should apply to 4.3.0 sources too)
------------------------------------------------------------------------
[2003-02-15 17:08:55] 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
I fixed a bug that prevented resetting the open_basedir
by using 'php_admin_value open_basedir none'.
This most likely fixes this problem for at least some of
you who have added comments to this report.
------------------------------------------------------------------------
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/19292
--
Edit this bug report at http://bugs.php.net/?id=19292&edit=1