Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 . or E:/path_to_wwwroot it works). How can I solve the problem. Is it possible that my provider blocked access to realpath?

Thanks!

like image 761
Jordy Avatar asked Oct 26 '11 17:10

Jordy


1 Answers

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.

like image 94
Alexey Morozov Avatar answered Oct 16 '22 17:10

Alexey Morozov