Minds Posted July 10, 2019 Share Posted July 10, 2019 Hi, I deleted a language (International - Localization - Languages - Delete ("language record"). this error has occurred Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/prestahopTest/modules/index.php/mails/fr/) is not within the allowed path(s): (/var/www/vhosts/prestahopTest:/tmp) The php instruction located in "classes/Language.php" (line 545): Tools::deleteDirectory(_PS_MODULE_DIR_ . $mod . '/mails/' . $this->iso_code); has executed this command: ToolsCore::deleteDirectory('/var/www/vhosts/prestashopTest/modules/index.php/mails/fr/') the code with error is: Symfony\Component\Debug\Exception\ ContextErrorException in classes/Tools.php (line 1091) * @param string $dirname Directory name */ public static function deleteDirectory($dirname, $delete_self = true) { $dirname = rtrim($dirname, '/') . '/'; if (file_exists($dirname)) { <------------------------------------------------ if ($files = scandir($dirname, SCANDIR_SORT_NONE)) { foreach ($files as $file) { if ($file != '.' && $file != '..' && $file != '.svn') { if (is_dir($dirname . $file)) { Tools::deleteDirectory($dirname . $file); my question is: how does the command "file_exists" search on a path that contains ".../modules/index.php/mails/..." ? this path will never exist! Thanks Link to comment Share on other sites More sharing options...
MaXi32 Posted November 17, 2019 Share Posted November 17, 2019 Similar question. The path doesn't exist. I re-add language and delete. This is reproduce-able error. Maybe a bug? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now