php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login go to bug id or search bugs for
Bug #66514 Submitted: realpath('.') and realpath('') return false instead of cwd 2014-01-19 10:07 UTC 2014-04-25 22:01 UTC james at digitaledgeit dot com dot au Closed Filesystem function related Irrelevant IIS 7.5, Windows 2008 R2 No None
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 !

[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"



## History

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