ID:               39351
 Comment by:       mcmullent at gmail dot com
 Reported By:      lampiluoto at gmail dot com
 Status:           Open
 Bug Type:         *Directory/Filesystem functions
 Operating System: Solaris10
 PHP Version:      5.2.0
 New Comment:

Is there any chance you need to add:

allow_url_include = On

to your php.ini? My php.ini file (from a previous PHP5 release) did not
have allow_url_include, and when I tried to upgrade from 5.1.6 to 5.2.x,
I was getting similar errors. When I set allow_url_include, I was able
to upgrade to 5.2.1 without any issues.


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

[2007-02-23 10:28:08] webtech at get-telecom dot fr

Is there a solution for this bug ?
We're using PHP 5.1.6 and can't upgrade...

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

[2007-02-09 16:54:55] lampiluoto at gmail dot com

Hello,

This bug seem to exist also in PHP 5.2.1, it
is behaving similarly to the 5.2.0 snapshot I 
tested. This is same PHP code I tested earlier.

I remind that this is situation where httpd user
doesn't have read privilege to every directory 
level in path. It has only execute/access (x) 
to some of the directories.

#
# 5.1.6 truss output
#
24204:  stat("./inc/config.php", 0xFFFFFD7FFFDFE470)    = 0
24204:  resolvepath("./inc/config.php", "inc/config.php", 1024) = 14
24204:  getcwd(0xFFFFFD7FFFDFD6F0, 1024)                Err#13 EACCES
[file_dac_read]
24204:  stat("./inc/config.php", 0xFFFFFD7FFFDFE390)    = 0
24204:  getcwd(0xFFFFFD7FFFDFDFA0, 1024)                Err#13 EACCES
[file_dac_read]
24204:  resolvepath("./inc/config.php", "inc/config.php", 1024) = 14
24204:  getcwd(0xFFFFFD7FFFDFD270, 1024)                Err#13 EACCES
[file_dac_read]
24204:  open("./inc/config.php", O_RDONLY)              = 34
24204:  fstat(34, 0x007E4F90)                           = 0
24204:  lseek(34, 0, SEEK_CUR)                          = 0
24204:  read(34, " < ? p h p\n\n     / /  ".., 8192)    = 1572
24204:  read(34, 0x007E27F8, 8192)                      = 0
24204:  read(34, 0x007E27F8, 8192)                      = 0
24204:  close(34)                                       = 0
24204:  time()                                          = 1171039558
24204: 
resolvepath("/data/sites/www.lampiluoto.net/dev-html/inc/func_prepare.php",
"/data/sites/www.mysite.example/dev-html/inc/func_prepare.php", 1024) =
60
24204: 
stat("/data/sites/www.mysite.example/dev-html/inc/func_prepare.php",
0xFFFFFD7FFFDFE360) = 0
24204: 
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
24204: 
open("/data/sites/www.mysite.example/dev-html/inc/func_prepare.php",
O_RDONLY) = 34
24204:  fstat(34, 0x007E5F10)                           = 0
24204:  lseek(34, 0, SEEK_CUR)                          = 0
24204:  read(34, " < ? p h p\n\n     / /\n".., 8192)    = 1171
24204:  read(34, 0x007E6C28, 8192)                      = 0
24204:  read(34, 0x007E6C28, 8192)                      = 0
24204:  brk(0x007E8F20)                                 = 0
24204:  brk(0x007ECF20)                                 = 0
24204:  brk(0x007ECF20)                                 = 0
24204:  brk(0x007ECF20)                                 = 0
24204:  brk(0x007F0F20)                                 = 0
24204:  close(34)                                       = 0
24204:  stat("./inc/db_interface.php", 0xFFFFFD7FFFDFD9C0) = 0
24204:  resolvepath("./inc/db_interface.php", "inc/db_interface.php",
1024) = 20
24204:  getcwd(0xFFFFFD7FFFDFCC40, 1024)                Err#13 EACCES
[file_dac_read]
24204:  stat("./inc/db_interface.php", 0xFFFFFD7FFFDFD8E0) = 0
24204:  getcwd(0xFFFFFD7FFFDFD4F0, 1024)                Err#13 EACCES
[file_dac_read]
24204:  resolvepath("./inc/db_interface.php", "inc/db_interface.php",
1024) = 20
24204:  getcwd(0xFFFFFD7FFFDFC7C0, 1024)                Err#13 EACCES
[file_dac_read]
24204:  open("./inc/db_interface.php", O_RDONLY)        = 34
24204:  fstat(34, 0x007E2E30)                           = 0
24204:  lseek(34, 0, SEEK_CUR)                          = 0
24204:  read(34, " < ? p h p\n\n / /\n / /".., 8192)    = 502
24204:  read(34, 0x007E6C28, 8192)                      = 0
24204:  read(34, 0x007E6C28, 8192)                      = 0
24204:  close(34)                                       = 0


#
# 5.2.1 truss output
#
23485:  stat("./inc/config.php", 0xFFFFFD7FFFDFE0D0)    = 0
23485:  getcwd(0xFFFFFD7FFFDFD360, 1024)                Err#13 EACCES
[file_dac_read]
23485:  resolvepath("./inc/config.php", "inc/config.php", 1024) = 14
23485:  getcwd(0xFFFFFD7FFFDFC660, 1024)                Err#13 EACCES
[file_dac_read]
23485:  stat("/inc/config.php", 0xFFFFFD7FFFDFDFF0)     Err#2 ENOENT
23485:  stat("/opt/httpd/dev-installation/php5/lib/php/inc/config.php",
0xFFFFFD7FFFDFE0D0) Err#2 ENOENT
23485:  stat("/data/sites/www.mysite.example/dev-html/inc/config.php",
0xFFFFFD7FFFDFE0D0) = 0
23485: 
resolvepath("/data/sites/www.mysite.example/dev-html/inc/config.php",
"/data/sites/www.mysite.example/dev-html/inc/config.php", 1024) = 54
23485:  stat("/data/sites/www.mysite.example/dev-html/inc/config.php",
0xFFFFFD7FFFDFDFF0) = 0
23485: 
resolvepath("/data/sites/www.mysite.example/dev-html/inc/config.php",
"/data/sites/www.mysite.example/dev-html/inc/config.php", 1024) = 54
23485:  open("/data/sites/www.mysite.example/dev-html/inc/config.php",
O_RDONLY) = 17
23485:  fstat(17, 0x005D0778)                           = 0
23485:  read(17, " < ? p h p\n\n     / /  ".., 8192)    = 1572
23485:  read(17, 0x005D0A20, 8192)                      = 0
23485:  close(17)                                       = 0
23485:  time()                                          = 1171038559
23485: 
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
23485: 
stat("/data/sites/www.mysite.example/dev-html/inc/func_prepare.php",
0xFFFFFD7FFFDFDFC0) = 0
23485: 
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
23485: 
open("/data/sites/www.mysite.example/dev-html/inc/func_prepare.php",
O_RDONLY) = 17
23485:  fstat(17, 0x005D0778)                           = 0
23485:  read(17, " < ? p h p\n\n     / /\n".., 8192)    = 1171
23485:  read(17, 0x005D4D10, 8192)                      = 0
23485:  close(17)                                       = 0
23485:  stat("./inc/db_interface.php", 0xFFFFFD7FFFDFD220) = 0
23485:  getcwd(0xFFFFFD7FFFDFC4B0, 1024)                Err#13 EACCES
[file_dac_read]
23485:  resolvepath("./inc/db_interface.php", "inc/db_interface.php",
1024) = 20
23485:  getcwd(0xFFFFFD7FFFDFB7B0, 1024)                Err#13 EACCES
[file_dac_read]
23485:  stat("/inc/db_interface.php", 0xFFFFFD7FFFDFD140) Err#2 ENOENT
23485: 
stat("/opt/httpd/dev-installation/php5/lib/php/inc/db_interface.php",
0xFFFFFD7FFFDFD220) Err#2 ENOENT
23485: 
stat("/data/sites/www.mysite.example/dev-html/inc/inc/db_interface.php",
0xFFFFFD7FFFDFD220) Err#2 ENOENT
23485:  open("/data/logs/httpd/error_log-php",
O_WRONLY|O_APPEND|O_CREAT, 0666) = 17
23485:  lseek(17, 0, SEEK_END)                          = 14856
23485:  time()                                          = 1171038559
23485:  fstat(17, 0xFFFFFD7FFFDFBAE0)                   = 0
23485:  brk(0x007D0C60)                                 = 0
23485:  brk(0x007D4C60)                                 = 0
23485:  fstat(17, 0xFFFFFD7FFFDFBA30)                   = 0
23485:  ioctl(17, TCGETA, 0xFFFFFD7FFFDFBAA0)           Err#25 ENOTTY
23485:  write(17, " [ 0 9 - F e b - 2 0 0 7".., 241)    = 241
23485:  close(17)                                       = 0
23485:  open("/data/logs/httpd/error_log-php",
O_WRONLY|O_APPEND|O_CREAT, 0666) = 17

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

[2007-02-08 14:03:58] webtech at get-telecom dot fr

What's up about this bug ?

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

[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 ''

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

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

Reply via email to