php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #39065 undocumented: symlink() changes behaviour depending on ZTS
Submitted: 2006-10-06 14:39 UTC Modified: 2011-04-08 21:37 UTC
Votes:5
Avg. Score:4.2 ± 1.0
Reproduced:4 of 4 (100.0%)
Same Version:0 (0.0%)
Same OS:3 (75.0%)
From: phpbugs at triphoenix dot de Assigned:
Status: Open Package: Filesystem function related
PHP Version: 5.2.2 OS: Unix
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
49 + 14 = ?
Subscribe to this entry?

 
 [2006-10-06 14:39 UTC] phpbugs at triphoenix dot de
Description:
------------
The symlink() function changes its behaviour depending on the ZTS define. If ZTS is not defined, all are created relative, if ZTS is enabled, the parameters are evaluated to actual absolute directories and thus are created absolute. This is different behaviour and should be at least documented in a proper way. 

Reproduce code:
---------------
symlink("..", "testlink");

Expected result:
----------------
Depending on enabled or disabled ZTS the symlink will be created relative (pointing to "..") or absolute (e.g. if currently in "/tmp/test/phptest" pointing to "/tmp/test"). If the link (or the directory containing it) is being moved/renamed later, the latter can lead to a broken link while the first cannot.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-10 16:32 UTC] brunofr at ioda dot net
Same issue pb sur php 5.2.2
 [2007-08-17 16:25 UTC] vrana@php.net
It should behave same.
 [2011-04-08 21:37 UTC] jani@php.net
-Package: Feature/Change Request +Package: Filesystem function related
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Dec 16 14:01:26 2018 UTC