Появился warning
Здравствуйте! Спасите, пожалуйста, молодую друпальщицу. После того, как я повесила сайт на хостинг появился (лись) вот такой warning:
warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 1326 is not allowed to access /tmp owned by uid 0 in /usr/home/ksmtv158/data/www/ksmtver.ru/includes/file.inc on line 190.
warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 1326 is not allowed to access /tmp owned by uid 0 in /usr/home/ksmtv158/data/www/ksmtver.ru/includes/file.inc on line 190.
Менять содержимое file.inc я пока не решилась, но оно выглядит так:
/**
* Check if a file is really located inside $directory. Should be used to make
* sure a file specified is really located within the directory to prevent
* exploits.
*
* @code
* // Returns FALSE:
* file_check_location('/www/example.com/files/../../../etc/passwd', '/www/example.com/files');
* @endcode
*
* @param $source A string set to the file to check.
* @param $directory A string where the file should be located.
* @return 0 for invalid path or the real path of the source.
*/
function file_check_location($source, $directory = '') {
$check = realpath($source);
if ($check) {
$source = $check;
}
else {
// This file does not yet exist
$source = realpath(dirname($source)) .'/'. basename($source);
}
>>строка 190>> $directory = realpath($directory);
if ($directory && strpos($source, $directory) !== 0) {
return 0;
}
return $source;
}