|
All in One -
Developer
|
|
Written by Administrator
|
|
Sunday, 27 February 2011 20:15 |
|
Summary : Warning: realpath() [function.realpath]: Unable to access /var/www/vhosts/... in /var/www/vhosts/.../httpdocs/libraries/joomla/filesystem/path.php Why : The PHP function realpath() appears to be not very consistent in its behaviour across OS-platforms and versions of PHP. As per PHP 5.4.2 in Ubuntu 8.04 LTS the function realpath() behaves differently. (for details: see http://nl.php.net/manual/en/function.realpath.php#82770). Solutions : There is 2 solutions for you : edit file /httpdocs/libraries/joomla/filesystem/path.php Solution 1 : You have to edit both lines adding "@" in front of both $path AND $fullname. [old code] $path = realpath($path); // needed for substr() later $fullname = realpath($fullname); [/old code] Replace with: [new code] @$path = realpath($path); // needed for substr() later @$fullname = realpath($fullname); [/new code]
Solution 2 : You have to edit like this. [old code] $path = realpath($path); // needed for substr() later $fullname = realpath($fullname); [old code]
Replace with:
[new code] if (file_exists($path)) { $path = realpath($path); // needed for substr() later $fullname = realpath($fullname); } else { $path = ''; $fullname = ''; } [/new code]
|
|
Last Updated ( Sunday, 27 February 2011 20:47 )
|