Bug #51860 [Asn->Csd]: Include fails with toplevel symlink to /
| From: | dmitry@php.net | Date: | Mon, 30 Jan 2012 10:52:44 +0000 |
| Subject: | Bug #51860 [Asn->Csd]: Include fails with toplevel symlink to / | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-166953@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=51860&edit=1
ID: 51860
Updated by: dmitry@php.net
Reported by: stephan dot suerken at 1und1 dot de
Summary: Include fails with toplevel symlink to /
-Status: Assigned
+Status: Closed
Type: Bug
Package: Scripting Engine problem
PHP Version: 5.3.2
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2012-01-30 10:08:09] dmitry@php.net
Automatic comment from SVN on behalf of dmitry
Revision: http://svn.php.net/viewvc/?view=revision&revision=322927
Log: Fixed bug #51860 (Include fails with toplevel symlink to /)
------------------------------------------------------------------------
[2012-01-28 21:11:13] rasmus@php.net
It turns out that this is a bug in the realpath cache implementation we added in
5.3. An inefficient workaround is to set realpath_cache_size=0 in your php.ini,
That fixes the issue, but you take a performance hit in terms of extra lstat
calls.
Still working on a simple fix that doesn't break everything for this one.
------------------------------------------------------------------------
[2012-01-28 18:48:31] rasmus@php.net
Never mind, I see it now.
% php phptest/phpinc
OK
But
% php /phptest/phpinc
Warning: include(/phptest/phpfile): failed to open stream: No such file or
directory in /phpinc on line 2
Warning: include(): Failed opening '/phptest/phpfile' for inclusion
(include_path='.:/usr/local/lib/php') in /phpinc on line 2
------------------------------------------------------------------------
[2012-01-28 18:44:05] rasmus@php.net
I am unable to reproduce this with current PHP versions.
Here is what I did:
% cd /
% ln -s / phptest
% echo "OK" > /phpfile
% echo '<?php include "/phptest/phpfile";' > /phpinc
% /home/rasmus/php-src/branches/PHP_5_4/sapi/cli/php phpinc
OK
% /home/rasmus/php-src/branches/PHP_5_3/sapi/cli/php phpinc
OK
% php phpinc
OK
% cd /phptest
% php phpinc
OK
What am I missing? This seems to be exactly the setup that thekid described.
------------------------------------------------------------------------
[2012-01-28 13:39:24] grobmeier at gmail dot com
I can only agree with startup09. Please fix it. Thousands 1&1 (among others)
customers are using old PHP because of this one. It is going to have birthday
soon. I cannot upgrade my Open Source projects because 5.2 ist sill used on so
many hosts. You need to get this done if you really have an interest your users
migrate to 5.3.
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=51860
--
Edit this bug report at https://bugs.php.net/bug.php?id=51860&edit=1