Esmoof Posted June 24, 2019 Share Posted June 24, 2019 Hello friends, I was trying these days to build a store and installing modules in my prestashop and I had this problem. Error 500 in the back-office after uninstalling a "Pretty URL" module that did not work correctly and activating a function to modify Dispatcher.php When I deactivate Debug Mode the front-office works, but the back-office gives error 500. With the debug mode activated I see the following errors in the front-office. Warning: file_put_contents(/opt/bitnami/apps/prestashop/htdocs/var/cache/dev/FrontContainer.php): failed to open stream: Permission denied in /opt/bitnami/apps/prestashop/htdocs/src/Adapter/ContainerBuilder.php on line 68 Whoops, looks like something went wrong. (1/1) ContextErrorException Warning: touch(): Utime failed: Permission denied in smarty_template_compiled.php line 178 at Smarty_Template_Compiled->compileTemplateSource(object(SmartyDevTemplate))in smarty_template_compiled.php line 141 at Smarty_Template_Compiled->process(object(SmartyDevTemplate))in smarty_template_compiled.php line 105 at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216 at Smarty_Internal_Template->render(false, 0)in smarty_internal_templatebase.php line 232 at Smarty_Internal_TemplateBase->_execute(object(SmartyDevTemplate), null, null, null, 0)in smarty_internal_templatebase.php line 116 at Smarty_Internal_TemplateBase->fetch(null, null, null, null, false, true, false)in SmartyDevTemplate.php line 40 at SmartyDevTemplateCore->fetch()in Module.php line 2413 at ModuleCore->fetch('module:stgadwordsconversion/views/templates/hook/header.tpl', 'stgadwordsconversion|1|6')in stgadwordsconversion.php line 309 at StGAdwordsConversion->hookDisplayHeader(array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 5))in Hook.php line 966 at HookCore::coreCallHook(object(StGAdwordsConversion), 'hookdisplayHeader', array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 5))in Hook.php line 351 at HookCore::callHookOn(object(StGAdwordsConversion), 'displayHeader', array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 5))in Hook.php line 903 at HookCore::exec('displayHeader')in FrontController.php line 555 at FrontControllerCore->initContent()in IndexController.php line 37 at IndexControllerCore->initContent()in Controller.php line 281 at ControllerCore->run()in Dispatcher.php line 511 at DispatcherCore->dispatch()in index.php line 28 Link to comment Share on other sites More sharing options...
JBW Posted June 25, 2019 Share Posted June 25, 2019 Two things you can try: 1. Remove the cache by deleting /var/cache/dev/ 2. Check if the override of Pretty URL module (probaly Dispatcher.php) is correclly removed from override directory 1 Link to comment Share on other sites More sharing options...
Esmoof Posted July 4, 2019 Author Share Posted July 4, 2019 I tried to delete but there are files that I do not have permission to delete them. Link to comment Share on other sites More sharing options...
Rhobur Posted July 7, 2019 Share Posted July 7, 2019 it probably means you have a wrong ownership on your files, depending on your hosting setup check if the apache user (e.g www-data) owns the files, in this case the perms have to be 0755 for directories and 0644 for files or if your files ownership is like user:apache user, you'll probably need to set up the perms as 0775 for directories and 0664 for files. Link to comment Share on other sites More sharing options...
Esmoof Posted July 9, 2019 Author Share Posted July 9, 2019 (edited) I am a Root but the permissions given to Prestashop to carry out their work are not the correct ones. It is a hosting created with bitnami with an instance of Prestashop in Google Cloud. There are many problems of permissions in Prestashop with the instances that they deploy. In order to upload files or modify them I have to log in as a root from a console and put 777 to the file I want to modify through FTP and then change the permissions again. It is a fudge. From Prestashop you have to give a warning to Bitnami because it is creating a bad reputation in the operation of Prestashop, because they create instances without permission for the proper functioning of Prestashop. Users are caught in problems of permissions, updates that can not be done correctly, modules that do not work, javascript that does not run ... etc ... etc .. Edited July 9, 2019 by Esmoof (see edit history) Link to comment Share on other sites More sharing options...
LieBM Posted July 9, 2019 Share Posted July 9, 2019 Hi, I can give you solution with that: 1. Go to /var directory and delete "cache" folder. Refresh page and cache folder will be regenerated. After that your issue should be fixed. that happens because Prestashop 1.7 save appParameters.php file with connection parameters cached into this folder. then if you change parameters in app/config/parameters.php, that is not enought, because the old one is cached into this folder. Best regards! 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