ID:               35301
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bgshea at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Safe Mode/open_basedir
 Operating System: Linux 2.6
 PHP Version:      5.0.5
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.




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

[2005-11-20 08:46:47] bgshea at gmail dot com

Description:
------------
[Sun Nov 20 00:36:12 2005] [error] [client 68.35.85.123] PHP Warning: 
readfile() [<a href='function.readfile'>function.readfile</a\
>]: open_basedir restriction in effect.
File(/home/bgshea/g2data/cache/module/core/0/0/0.inc) is not within the
allowed path(s): (/\
mnt/sdc1/pub/www/:/usr/local/php-5.0.5/lib/:/mnt/sdc1/home/:/mnt/sdc1/pub/webfiles/)
in /mnt/sdc1/home/bgshea/webpage/fopen.php on \
line 12, referer: http://www.hackthebox.org/~bgshea/

NOTE: /home is a symlink to /mnt/sdc1/home

This is my first bug report, so if this does not post right, I'm sorry.
BTW: I've spent 5 hours trying to fix this, looked at all bugs related
to open_basedir and could not figure this out.

Reproduce code:
---------------
//Test a file open under /home/ works
$file=fopen("/home/bgshea/webpage/info.php", "r" );
fclose( $file );
//test a file read under /home/bgshea/g2data, works
readfile( "/home/bgshea/g2data/install.log" );
//This should work, but fails. Why? no symlinks here.
readfile("/home/bgshea/g2data/cache/module/core/0/0/0.inc");


open_basedir was set in httpd.conf to be
/mnt/sdc1/pub/www/:/usr/local/php-5.0.5/lib/:/mnt/sdc1/home/:/mnt/sdc1/pub/webfiles/


Expected result:
----------------
/home/bgshea/g2data/cache/module/core/0/0/0.inc file should be opened

Actual result:
--------------
Error message reported in log file, php script is terminated


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


-- 
Edit this bug report at http://bugs.php.net/?id=35301&edit=1

Reply via email to