php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5935 realpath() contains '/./'
Submitted: 2000-08-03 07:26 UTC Modified: 2000-08-06 18:34 UTC
From: php-bugs at bjoernsworld dot de Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0.1pl2 OS: Winnt 4.0 SP 4
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: php-bugs at bjoernsworld dot de
New email:
PHP Version: OS:

 

 [2000-08-03 07:26 UTC] php-bugs at bjoernsworld dot de
The manual say for realpath():

"[...]The resulting path will have no symbolic link, '/./' or '/../' components."

This is not true for '.' and '..':

[...]
D:\dev\php\http\tests>php
<?
print realpath('./');
^Z
X-Powered-By: PHP/4.0.1pl2
Content-type: text/html

D:\dev\php\http\tests\./
[...]

using '..' even breaks the path:

[...]
D:\dev\php\http\tests>php
<?
print realpath("..");
^Z
X-Powered-By: PHP/4.0.1pl2
Content-type: text/html

D:\dev\php\http./
[...]

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-06 18:33 UTC] stas@php.net
Should be fixed in CVS. Please check.
 [2000-08-06 18:34 UTC] stas@php.net
Close, not suspend.
# I _hate_ focusing policy in windows...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 08:01:33 2024 UTC