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
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: 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

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC