Jordy Jordy - 2 years ago 141
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?


Answer Source


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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download