|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11640 realpath(): wrong results with $PHP_SELF
Submitted: 2001-06-24 10:27 UTC Modified: 2001-12-08 19:52 UTC
From: c dot steinmann at gmx dot net Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.0.6 OS: WIN NT
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: c dot steinmann at gmx dot net
New email:
PHP Version: OS:


 [2001-06-24 10:27 UTC] c dot steinmann at gmx dot net


doesn't give the same result as 


While the result of the second example is correct, the first one outputs only part of the value, in my case:

Correct: d:\inetpub\wwwroot\blue\index.php
Result:  d:\blue\index.php

wwwroot is DOCUMENT_ROOT in my case. 
I use NT4/IIS with PHP as ISAPI (not in safe mode).



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-08 19:52 UTC]
RTFM.  Realpath is for system paths, $PHP_SELF is relative to the web root.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Sep 27 08:05:51 2022 UTC