ajs6116 Posted November 5, 2017 Share Posted November 5, 2017 Guys, How can I enable my PS 1.6.1.17 site to work with php7. Currently running under php 5.6, however, other products that I need to run on my hosting site require php7. I would like to get all of my hosted software running under php7. I am getting the Error 500 when I switch my site to php 7.0.22. Thanks, Art Link to comment Share on other sites More sharing options...
tuk66 Posted November 6, 2017 Share Posted November 6, 2017 PrestaShop 1.6.1.17 is compatible with PHP 7, but I cannot say the same for all modules. Turn on Debug mode to see the exact error. Link to comment Share on other sites More sharing options...
ajs6116 Posted November 6, 2017 Author Share Posted November 6, 2017 So I was able find an offending module and and uninstalling it. Link to comment Share on other sites More sharing options...
ajs6116 Posted November 6, 2017 Author Share Posted November 6, 2017 Guys, I managed to get my shop to work with php7 - mostly. Now, when I click on the Modules menu item in the back office I get the following error: [PrestaShop] Fatal error in module file :/home/lynscr5/public_html/yarnstore/classes/module/Module.php(1361) : eval()'d code:'continue' not in the 'loop' or 'switch' context This seems to be a core module. Any ideas as to why I would be getting this error? Here is code at line 1361: // If (false) is a trick to not load the class with "eval". // This way require_once will works correctly if (eval('if (false){ '.$file."\n".' }') !== false) { require_once(_PS_MODULE_DIR_.$module.'/'.$module.'.php'); } else { $errors[] = sprintf(Tools::displayError('%1$s (parse error in %2$s)'), $module, substr($file_path, strlen(_PS_ROOT_DIR_))); } Thanks, Art Link to comment Share on other sites More sharing options...
bellini13 Posted November 7, 2017 Share Posted November 7, 2017 There is likely still a module installed that is not compatible with PS v1.6.1.17 While the class reporting the issue is a Core PS class (Module), the code that is executing is trying to load a particular modules main class file, and it cannot do that for some reason require_once(_PS_MODULE_DIR_.$module.'/'.$module.'.php'); You could try to add some debug statements around 1361 of the module class to figure out what the $module object is 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