php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14745 ulink handles relative links oddly
Submitted: 2001-12-28 14:56 UTC Modified: 2001-12-28 15:05 UTC
From: caldwell at primes dot utm dot edu Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.1.1 OS: Linux 2.4.4-ac6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: caldwell at primes dot utm dot edu
New email:
PHP Version: OS:

 

 [2001-12-28 14:56 UTC] caldwell at primes dot utm dot edu
I am using the relative path "../includes/gifs/" in a script "upload.php".  This script is in a directory called
glossary/admin, and I have a soft link to it in one called 
curios/admin.  

When I access it from curios/admin (over the web), the command dir works fine with ""../includes/gifs/" and returns the listing of curios/includes/gifs/.  But when
the same script from the same URL executes unlink on
"../includes/gifs/up.gif" it complains 

  Warning: Unlink failed (No such file or directory) in /home/caldwell/public_html/glossary/admin/upload.php on line 62

In short: dir(../*) seems to be relative to the script
soft link, and unlink(../*) seems to be relative to the soft link's target.

Configure line:

 './configure' '--with-mysql=/usr/local' '--with-apache=../apache_1.3.22' '--enable-track-vars' '--with-posix' '--enable-sockets' '--with-gmp' '--with-db2' '--with-ndbm'

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Nov 27 19:03:46 2022 UTC