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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 15:01:27 2025 UTC