ID: 39351
Comment by: webtech at get-telecom dot fr
Reported By: lampiluoto at gmail dot com
Status: Open
Bug Type: *Directory/Filesystem functions
Operating System: Solaris10
PHP Version: 5.2.0
New Comment:
What's up about this bug ?
Previous Comments:
------------------------------------------------------------------------
[2006-12-05 23:30:09] php dot net at ryanfindley dot com
I forgot to mention that I tried the snapshot listed in the comment
from 15 Nov 12:42pm UTC (PHP 5.2.1-dev), and experienced the same
problem
------------------------------------------------------------------------
[2006-12-05 23:06:42] php dot net at ryanfindley dot com
I'm experiencing the same problem on OS X 10.4 PPC 64bit(G5), but not
on OS X 10.4 Intel 32bit.
If I revert my PHP install to 5.1.4, the problem goes away but using
5.2.0 all of my include() and require() statements that use a relative
path fail, and getcwd() returns ''
------------------------------------------------------------------------
[2006-11-15 13:30:33] lampiluoto at gmail dot com
Here's truss output with php5.2-200611151130.
There seems to be changes for stat()'ing the
file and though it fixes the first
include('inc/config.php') it causes problems
later on.
Including func_prepare.php is with absolute path
in PHP code and then including db_interface.php
is with relative path. Just for testing ;)
I have --prefix=/opt/httpd/dev-installation/php5 for
configuring PHP and it even tries to stat() files
from there. Result is failing includes. Truss
output differs quite a lot from 5.1.6.
#
# php5.2-200611151130
#
25255: stat("./inc/config.php", 0xFFFFFD7FFFDFDF70) = 0
25255: getcwd(0xFFFFFD7FFFDFD200, 1024) Err#13 EACCES
[file_dac_read]
25255: resolvepath("./inc/config.php", "inc/config.php", 1024) = 14
25255: getcwd(0xFFFFFD7FFFDFC500, 1024) Err#13 EACCES
[file_dac_read]
25255: stat("^B", 0xFFFFFD7FFFDFDE90) Err#2 ENOENT
25255:
stat("/opt/httpd/dev-installation/php5/lib/php/inc/config.php",0xFFFFFD7FFFDFDF70)
Err#2 ENOENT
25255:
stat("/data/sites/www.mysite.example/dev-html/inc/config.php",0xFFFFFD7FFFDFDF70)
= 0
25255:
resolvepath("/data/sites/www.mysite.example/dev-html/inc/config.php",
"/data/sites/www.mysite.example/dev-html/inc/config.php", 1024) = 54
25255: stat("/data/sites/www.mysite.example/dev-html/inc/config.php",
0xFFFFFD7FFFDFDE90) = 0
25255:
resolvepath("/data/sites/www.mysite.example/dev-html/inc/config.php",
"/data/sites/www.mysite.example/dev-html/inc/config.php", 1024) = 54
25255:
open("/data/sites/www.mysite.example/dev-html/inc/config.php",O_RDONLY)
= 17
25255: fstat(17, 0x007BCA68) = 0
25255: read(17, " < ? p h p\n\n / / ".., 8192) = 1572
25255: read(17, 0x007BCD10, 8192) = 0
25255: close(17) = 0
25255: time() = 1163596213
25255:
resolvepath("/data/sites/www.mysite.example/dev-html/inc/func_prepare.php",
"/data/sites/www.mysite.example/dev-html/inc/func_prepare.php", 1024) =
60
25255:
stat("/data/sites/www.mysite.example/dev-html/inc/func_prepare.php",0xFFFFFD7FFFDFDE60)
= 0
25255:
resolvepath("/data/sites/www.mysite.example/dev-html/inc/func_prepare.php",
"/data/sites/www.mysite.example/dev-html/inc/func_prepare.php", 1024) =
60
25255:
open("/data/sites/www.mysite.example/dev-html/inc/func_prepare.php",O_RDONLY)
= 17
25255: fstat(17, 0x007BCA68) = 0
25255: read(17, " < ? p h p\n\n / /\n".., 8192) = 1171
25255: read(17, 0x007C1000, 8192) = 0
25255: close(17) = 0
25255: stat("./inc/db_interface.php", 0xFFFFFD7FFFDFD0C0) = 0
25255: getcwd(0xFFFFFD7FFFDFC350, 1024) Err#13 EACCES
[file_dac_read]
25255: resolvepath("./inc/db_interface.php", "inc/db_interface.php",
1024) = 20
25255: getcwd(0xFFFFFD7FFFDFB650, 1024) Err#13 EACCES
[file_dac_read]
25255: stat("^C", 0xFFFFFD7FFFDFCFE0) Err#2 ENOENT
25255:
stat("/opt/httpd/dev-installation/php5/lib/php/inc/db_interface.php",
0xFFFFFD7FFFDFD0C0) Err#2 ENOENT
25255:
stat("/data/sites/www.mysite.example/dev-html/inc/inc/db_interface.php",
0xFFFFFD7FFFDFD0C0) Err#2 ENOENT
25255: open("/data/logs/httpd/error_log-php",
O_WRONLY|O_APPEND|O_CREAT,0666) = 17
25255: lseek(17, 0, SEEK_END) = 9904
25255: time() = 1163596213
25255: fstat(17, 0xFFFFFD7FFFDFB990) = 0
25255: fstat(17, 0xFFFFFD7FFFDFB8E0) = 0
25255: ioctl(17, TCGETA, 0xFFFFFD7FFFDFB950) Err#25 ENOTTY
25255: write(17, " [ 1 5 - N o v - 2 0 0 6".., 241) = 241
25255: close(17) = 0
25255: open("/data/logs/httpd/error_log-php",
O_WRONLY|O_APPEND|O_CREAT,0666) = 17
------------------------------------------------------------------------
[2006-11-15 12:42:59] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
------------------------------------------------------------------------
[2006-11-12 19:17:43] lampiluoto at gmail dot com
Here is part of the truss output, I can provide the whole output if
needed. After failing getcwd() 5.2.0 tries to open file with wrong
path.
#
# PHP-5.1.6
#
662: stat("./inc/config.php", 0xFFFFFD7FFFDFDEE0) = 0
662: resolvepath("./inc/config.php", "inc/config.php", 1024) = 14
662: getcwd(0xFFFFFD7FFFDFD160, 1024) Err#13 EACCES
[file_dac_read]
662: stat("./inc/config.php", 0xFFFFFD7FFFDFDE00) = 0
662: getcwd(0xFFFFFD7FFFDFDA10, 1024) Err#13 EACCES
[file_dac_read]
662: resolvepath("./inc/config.php", "inc/config.php", 1024) = 14
662: getcwd(0xFFFFFD7FFFDFCCE0, 1024) Err#13 EACCES
[file_dac_read]
662: open("./inc/config.php", O_RDONLY) = 17
662: fstat(17, 0x00783920) = 0
662: lseek(17, 0, SEEK_CUR) = 0
662: read(17, " < ? p h p\n\n / / ".., 8192) = 1572
662: read(17, 0x0077F258, 8192) = 0
662: read(17, 0x0077F258, 8192) = 0
662: close(17) = 0
662: time() = 1163357246
#
# PHP-5.2.0
#
17703: stat("./inc/config.php", 0xFFFFFD7FFFDFDFB0) = 0
17703: resolvepath("./inc/config.php", "inc/config.php", 1024) = 14
17703: getcwd(0xFFFFFD7FFFDFD230, 1024) Err#13 EACCES
[file_dac_read]
17703: stat("./inc/config.php", 0xFFFFFD7FFFDFDED0) = 0
17703: getcwd(0xFFFFFD7FFFDFDAE0, 1024) Err#13 EACCES
[file_dac_read]
17703: resolvepath("./inc/config.php", "inc/config.php", 1024) = 14
17703: getcwd(0xFFFFFD7FFFDFCDE0, 1024) Err#13 EACCES
[file_dac_read]
17703: open("/inc/config.php", O_RDONLY) Err#2 ENOENT
17703: open("/data/logs/httpd/error_log-php",
O_WRONLY|O_APPEND|O_CREAT,0666) = 17
17703: lseek(17, 0, SEEK_END) = 0
17703: time() = 1163358385
17703: fstat(17, 0xFFFFFD7FFFDFC880) = 0
17703: fstat(17, 0xFFFFFD7FFFDFC7D0) = 0
17703: ioctl(17, TCGETA, 0xFFFFFD7FFFDFC840) Err#25 ENOTTY
17703: write(17, " [ 1 2 - N o v - 2 0 0 6".., 224) = 224
17703: close(17) = 0
------------------------------------------------------------------------
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/39351
--
Edit this bug report at http://bugs.php.net/?id=39351&edit=1