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
 [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: Wed Apr 24 15:01:30 2024 UTC