Bug #51860 [Com]: Include fails with toplevel symlink to /

2011-07-06 Thread rainer at hosting-ist-mein-leben dot de
Edit report at https://bugs.php.net/bug.php?id=51860edit=1

 ID: 51860
 Comment by: rainer at hosting-ist-mein-leben dot de
 Reported by:stephan dot suerken at 1und1 dot de
 Summary:Include fails with toplevel symlink to /
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 PHP Version:5.3.2
 Block user comment: N
 Private report: N

 New Comment:

In latest 5.4.0-alpha1 problem is still there.


Previous Comments:

[2011-01-21 10:34:00] plubber at gmx dot ch

no solution?

I have the same problem with mounted NFS


[2011-01-12 17:47:37] rainer at hosting-ist-mein-leben dot de

I mean 5.3.5


[2011-01-12 17:46:30] rainer at hosting-ist-mein-leben dot de

Problem also in the new version (5.3.3)


[2010-08-13 17:08:41] rainer at hosting-ist-mein-leben dot de

Problem also in the new version (5.3.3)


[2010-06-27 12:26:44] rainer at hosting-ist-mein-leben dot de

Hi,

we got this problem too. We need a fix for this. Plz. thx.

cu
Rainer




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=51860edit=1


Bug #51860 [Com]: Include fails with toplevel symlink to /

2011-01-12 Thread rainer at hosting-ist-mein-leben dot de
Edit report at http://bugs.php.net/bug.php?id=51860edit=1

 ID: 51860
 Comment by: rainer at hosting-ist-mein-leben dot de
 Reported by:stephan dot suerken at 1und1 dot de
 Summary:Include fails with toplevel symlink to /
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 PHP Version:5.3.2
 Block user comment: N
 Private report: N

 New Comment:

Problem also in the new version (5.3.3)


Previous Comments:

[2010-08-13 17:08:41] rainer at hosting-ist-mein-leben dot de

Problem also in the new version (5.3.3)


[2010-06-27 12:26:44] rainer at hosting-ist-mein-leben dot de

Hi,



we got this problem too. We need a fix for this. Plz. thx.



cu

Rainer


[2010-05-21 14:04:12] stephan dot suerken at 1und1 dot de

 [2010-05-21 09:37 UTC] the...@php.net



 Wait:



 So if the executed script itself is inside the symlink'd directory, 

 VCWD_REALPATH() does not correctly work (used by both include /
require and

 realpath(), that's why I'm using the latter here)



Great, thanks, that sounds much like what I expected ;).



If it might be helpful, I already stepped through the code with gdb
(breaking in some top level *resolve_path (cant remeber exaytly right
now) function ), finding the bug does _not_ occur then; maybe this hints
to some strange race condition.



Thx,



Stephan


[2010-05-21 13:58:12] the...@php.net

Here's the simplest way to reproduce:



xpsrv / # ln -s / phptest

xpsrv / # echo OK  /phpfile

xpsrv / # echo '?php include(/phptest/phpfile);'  /phpinc



Works:

xpsrv / # php532 /phpinc

OK



Breaks:

xpsrv / # php532 /phptest/phpinc

Warning: include(/phptest/phpfile): failed to open stream: No such file
or directory in /phpinc on line 1

Warning: include(): Failed opening '/phptest/phpfile' for inclusion
(include_path='.:') in /phpinc on line 1



xpsrv / # php532 -v | head -1

PHP 5.3.2 (cli) (built: May 21 2010 12:18:37)


[2010-05-21 13:44:33] stephan dot suerken at 1und1 dot de

 [2010-05-21 09:12 UTC] the...@php.net 



Your simplified way does not produce the bug; did you do it with the
exact settings in the tarball (really, it does not harm!)? Thing is, the
slightest change in the setup make the bug go away, and the exact
setup described in the tarball reproduces it.



For what I know, you _need_ the extra include dir under / to reproduce,
and you _must_ call php as described in the fail script in the
tarball, i.e. with the full path _including_ the symlink. Both is not in
your simplified way to reproduce it.



Thanks!



Stephan




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/bug.php?id=51860


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51860edit=1


Bug #51860 [Com]: Include fails with toplevel symlink to /

2011-01-12 Thread rainer at hosting-ist-mein-leben dot de
Edit report at http://bugs.php.net/bug.php?id=51860edit=1

 ID: 51860
 Comment by: rainer at hosting-ist-mein-leben dot de
 Reported by:stephan dot suerken at 1und1 dot de
 Summary:Include fails with toplevel symlink to /
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 PHP Version:5.3.2
 Block user comment: N
 Private report: N

 New Comment:

I mean 5.3.5


Previous Comments:

[2011-01-12 17:46:30] rainer at hosting-ist-mein-leben dot de

Problem also in the new version (5.3.3)


[2010-08-13 17:08:41] rainer at hosting-ist-mein-leben dot de

Problem also in the new version (5.3.3)


[2010-06-27 12:26:44] rainer at hosting-ist-mein-leben dot de

Hi,



we got this problem too. We need a fix for this. Plz. thx.



cu

Rainer


[2010-05-21 14:04:12] stephan dot suerken at 1und1 dot de

 [2010-05-21 09:37 UTC] the...@php.net



 Wait:



 So if the executed script itself is inside the symlink'd directory, 

 VCWD_REALPATH() does not correctly work (used by both include /
require and

 realpath(), that's why I'm using the latter here)



Great, thanks, that sounds much like what I expected ;).



If it might be helpful, I already stepped through the code with gdb
(breaking in some top level *resolve_path (cant remeber exaytly right
now) function ), finding the bug does _not_ occur then; maybe this hints
to some strange race condition.



Thx,



Stephan


[2010-05-21 13:58:12] the...@php.net

Here's the simplest way to reproduce:



xpsrv / # ln -s / phptest

xpsrv / # echo OK  /phpfile

xpsrv / # echo '?php include(/phptest/phpfile);'  /phpinc



Works:

xpsrv / # php532 /phpinc

OK



Breaks:

xpsrv / # php532 /phptest/phpinc

Warning: include(/phptest/phpfile): failed to open stream: No such file
or directory in /phpinc on line 1

Warning: include(): Failed opening '/phptest/phpfile' for inclusion
(include_path='.:') in /phpinc on line 1



xpsrv / # php532 -v | head -1

PHP 5.3.2 (cli) (built: May 21 2010 12:18:37)




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/bug.php?id=51860


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51860edit=1


Bug #51860 [Com]: Include fails with toplevel symlink to /

2010-08-13 Thread rainer at hosting-ist-mein-leben dot de
Edit report at http://bugs.php.net/bug.php?id=51860edit=1

 ID: 51860
 Comment by: rainer at hosting-ist-mein-leben dot de
 Reported by:stephan dot suerken at 1und1 dot de
 Summary:Include fails with toplevel symlink to /
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 PHP Version:5.3.2
 Block user comment: N

 New Comment:

Problem also in the new version (5.3.3)


Previous Comments:

[2010-06-27 12:26:44] rainer at hosting-ist-mein-leben dot de

Hi,



we got this problem too. We need a fix for this. Plz. thx.



cu

Rainer


[2010-05-21 14:04:12] stephan dot suerken at 1und1 dot de

 [2010-05-21 09:37 UTC] the...@php.net



 Wait:



 So if the executed script itself is inside the symlink'd directory, 

 VCWD_REALPATH() does not correctly work (used by both include /
require and

 realpath(), that's why I'm using the latter here)



Great, thanks, that sounds much like what I expected ;).



If it might be helpful, I already stepped through the code with gdb
(breaking in some top level *resolve_path (cant remeber exaytly right
now) function ), finding the bug does _not_ occur then; maybe this hints
to some strange race condition.



Thx,



Stephan


[2010-05-21 13:58:12] the...@php.net

Here's the simplest way to reproduce:



xpsrv / # ln -s / phptest

xpsrv / # echo OK  /phpfile

xpsrv / # echo '?php include(/phptest/phpfile);'  /phpinc



Works:

xpsrv / # php532 /phpinc

OK



Breaks:

xpsrv / # php532 /phptest/phpinc

Warning: include(/phptest/phpfile): failed to open stream: No such file
or directory in /phpinc on line 1

Warning: include(): Failed opening '/phptest/phpfile' for inclusion
(include_path='.:') in /phpinc on line 1



xpsrv / # php532 -v | head -1

PHP 5.3.2 (cli) (built: May 21 2010 12:18:37)


[2010-05-21 13:44:33] stephan dot suerken at 1und1 dot de

 [2010-05-21 09:12 UTC] the...@php.net 



Your simplified way does not produce the bug; did you do it with the
exact settings in the tarball (really, it does not harm!)? Thing is, the
slightest change in the setup make the bug go away, and the exact
setup described in the tarball reproduces it.



For what I know, you _need_ the extra include dir under / to reproduce,
and you _must_ call php as described in the fail script in the
tarball, i.e. with the full path _including_ the symlink. Both is not in
your simplified way to reproduce it.



Thanks!



Stephan


[2010-05-21 13:37:53] the...@php.net

Wait:



# /opt/php/php-5.3.2/sapi/cli/php -r
'var_dump(realpath(/phplink/phpinclude/inc123.php));' 

string(22) /phpinclude/inc123.php



...and:

# echo '?php var_dump(realpath(/phplink/phpinclude/inc123.php));' 
test.php

# /opt/php/php-5.3.2/sapi/cli/php test.php

string(22) /phpinclude/inc123.php



But:

# echo '?php var_dump(realpath(/phplink/phpinclude/inc123.php));' 
/phplink/phptest/test.php

# /opt/php/php-5.3.2/sapi/cli/php /phplink/phptest/test.php  

bool(false)



So if the executed script itself is inside the symlink'd directory,
VCWD_REALPATH() does not correctly work (used by both include / require
and realpath(), that's why I'm using the latter here)



This does not occur with PHP 5.2.X (or PHP4, btw)




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/bug.php?id=51860


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51860edit=1


Bug #51860 [Com]: Include fails with toplevel symlink to /

2010-06-27 Thread rainer at hosting-ist-mein-leben dot de
Edit report at http://bugs.php.net/bug.php?id=51860edit=1

 ID:  51860
 Comment by:  rainer at hosting-ist-mein-leben dot de
 Reported by: stephan dot suerken at 1und1 dot de
 Summary: Include fails with toplevel symlink to /
 Status:  Open
 Type:Bug
 Package: Scripting Engine problem
 PHP Version: 5.3.2

 New Comment:

Hi,



we got this problem too. We need a fix for this. Plz. thx.



cu

Rainer


Previous Comments:

[2010-05-21 14:04:12] stephan dot suerken at 1und1 dot de

 [2010-05-21 09:37 UTC] the...@php.net



 Wait:



 So if the executed script itself is inside the symlink'd directory, 

 VCWD_REALPATH() does not correctly work (used by both include /
require and

 realpath(), that's why I'm using the latter here)



Great, thanks, that sounds much like what I expected ;).



If it might be helpful, I already stepped through the code with gdb
(breaking in some top level *resolve_path (cant remeber exaytly right
now) function ), finding the bug does _not_ occur then; maybe this hints
to some strange race condition.



Thx,



Stephan


[2010-05-21 13:58:12] the...@php.net

Here's the simplest way to reproduce:



xpsrv / # ln -s / phptest

xpsrv / # echo OK  /phpfile

xpsrv / # echo '?php include(/phptest/phpfile);'  /phpinc



Works:

xpsrv / # php532 /phpinc

OK



Breaks:

xpsrv / # php532 /phptest/phpinc

Warning: include(/phptest/phpfile): failed to open stream: No such file
or directory in /phpinc on line 1

Warning: include(): Failed opening '/phptest/phpfile' for inclusion
(include_path='.:') in /phpinc on line 1



xpsrv / # php532 -v | head -1

PHP 5.3.2 (cli) (built: May 21 2010 12:18:37)


[2010-05-21 13:44:33] stephan dot suerken at 1und1 dot de

 [2010-05-21 09:12 UTC] the...@php.net 



Your simplified way does not produce the bug; did you do it with the
exact settings in the tarball (really, it does not harm!)? Thing is, the
slightest change in the setup make the bug go away, and the exact
setup described in the tarball reproduces it.



For what I know, you _need_ the extra include dir under / to reproduce,
and you _must_ call php as described in the fail script in the
tarball, i.e. with the full path _including_ the symlink. Both is not in
your simplified way to reproduce it.



Thanks!



Stephan


[2010-05-21 13:37:53] the...@php.net

Wait:



# /opt/php/php-5.3.2/sapi/cli/php -r
'var_dump(realpath(/phplink/phpinclude/inc123.php));' 

string(22) /phpinclude/inc123.php



...and:

# echo '?php var_dump(realpath(/phplink/phpinclude/inc123.php));' 
test.php

# /opt/php/php-5.3.2/sapi/cli/php test.php

string(22) /phpinclude/inc123.php



But:

# echo '?php var_dump(realpath(/phplink/phpinclude/inc123.php));' 
/phplink/phptest/test.php

# /opt/php/php-5.3.2/sapi/cli/php /phplink/phptest/test.php  

bool(false)



So if the executed script itself is inside the symlink'd directory,
VCWD_REALPATH() does not correctly work (used by both include / require
and realpath(), that's why I'm using the latter here)



This does not occur with PHP 5.2.X (or PHP4, btw)


[2010-05-21 13:12:21] the...@php.net

Cannot reproduce on Gentoo with 5.3.2-RELEASE.




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/bug.php?id=51860


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51860edit=1