php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
37 + 17 = ?
Subscribe to this entry?

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

realpath($PHP_SELF);

doesn't give the same result as 

realpath('index.php');

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).

Christoph

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-08 19:52 UTC] cardinal@php.net
RTFM.  Realpath is for system paths, $PHP_SELF is relative to the web root.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 12:01:29 2024 UTC