Jordy Jordy - 11 months ago 69
PHP Question

realpath returns empty string

I use MediaWiki but there is an error. I found it in the files. There is line with this code:

$IP = realpath( '.' );

But $IP returns an empty string, so the path to the files in the system is not working. (for example if $IP would be
it works). How can I solve the problem. Is it possible that my provider blocked access to realpath?




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.