realpath returns empty string
Source: http://php.net/manual/en/function.realpath.php
Note: The running script must have executable permissions on all directories in the hierarchy, otherwise
realpath()
will return FALSE.
So your web server should have access also to pre-webroot directories.
I am currently experiencing this result when running PHP from command line, but not within an HTTP request. Got to be config or $_SERVER settings somewhere, will update if I find the fix.