|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-11-11 07:19 UTC] edink@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 19:00:02 2025 UTC |
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.