php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66514 realpath('.') and realpath('') return false instead of cwd
Submitted: 2014-01-19 10:07 UTC Modified: 2014-04-25 22:01 UTC
From: james at digitaledgeit dot com dot au Assigned:
Status: Closed Package: Filesystem function related
PHP Version: Irrelevant OS: IIS 7.5, Windows 2008 R2
Private report: No CVE-ID: None
 [2014-01-19 10:07 UTC] james at digitaledgeit dot com dot au
Description:
------------
Our client tried to install our application on PHP 5.4.14, 5.3.24 and 5.3.3 for IIS 7.5 on Windows 2008 R2 (Enterprise).

On troubleshooting we noticed realpath('.') and realpath('') were returning false instead of the current working directory.


Test script:
---------------
var_dump(realpath('.'), realpath(''));

Expected result:
----------------
string (x) "c:\some\path\to\public"
string (x) "c:\some\path\to\public"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-19 13:45 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2014-01-19 13:45 UTC] ab@php.net
Works as expected for me, I suspect you have some environment issue. Please reveal more on your environment - is that local system, is there something in the logs, etc? Have you tried the same with CLI, another folder, another machine ... ?
 [2014-04-23 13:31 UTC] ab@php.net
-Status: Feedback +Status: No Feedback
 [2014-04-23 13:31 UTC] ab@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


 [2014-04-25 22:01 UTC] james at digitaledgeit dot com dot au
-Status: No Feedback +Status: Closed
 [2014-04-25 22:01 UTC] james at digitaledgeit dot com dot au
Unfortunately we no longer have access to the client's machine and are unable to provide further information. When we investigated the client's issue we did not find any notifications in the standard error log. We implemented a hot fix for the client utilising the getcwd() function, which did work. See https://github.com/zendframework/zf2/pull/5729.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Nov 30 03:03:45 2022 UTC