From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.2.3
PHP Bug Type:     Filesystem function related
Bug description:  On Apache2 file_exists & co are looking in wrong directory

PHP functions which map to access() libc function are looking in wrong
directory under Apache2. Simple example:
$FILE = "test.php";
file_exists($FILE);
is_readable($FILE);
fopen($FILE, "r");

produces such output from strace:
access("test.php", F_OK)                = -1 ENOENT (No such file or
directory)
access("test.php", R_OK)                = -1 ENOENT (No such file or
directory)
open("/home/httpd/html.michal.waw.pl",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 22

Also note that:
[root@woland html.michal.waw.pl]# l /proc/16627/cwd
lrwxrwxrwx    1 root     root            0 11-11 13:57 /proc/16627/cwd ->
/
[root@woland html.michal.waw.pl]#
where 16627 is a PID of httpd process which was traced earlier.
-- 
Edit bug report at http://bugs.php.net/?id=20360&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20360&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20360&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20360&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20360&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20360&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20360&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20360&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20360&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20360&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20360&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20360&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20360&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20360&r=isapi

Reply via email to