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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: phpbugs at triphoenix dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 25 10:01:32 2024 UTC