If you're an e-commerce entrepreneur who uses PrestaShop, you know the importance of a smooth installation process. Unfortunately, some users have encountered an issue when installing a fresh copy of PrestaShop 8.1.3 and newer versions. The installation process pauses at 56%, and an error notification pops up, preventing successful installation. Here's what you need to know about this error and how to fix it.
The error that stops the installation process reads:
1:HTTP 500 - error -{"success":true,"message":""}
This error appears because there is a locked file called appAppKernelProdContainer.php.cache_clear.lock
inside the cache folder. When PrestaShop tries to mirror, rename, copy, or delete the file, it fails silently, causing the installation to hang.
Fortunately, there's a straightforward solution to this problem. The key is to edit the kernel function getContainerClearCacheLockPath
on AppKernel.php
file before installing PrestaShop. Here's how you do it:
getContainerClearCacheLockPath
function.protected function getContainerClearCacheLockPath(): string { $class = $this->getContainerClass(); $cacheDir = sys_get_temp_dir(); //$this->getCacheDir(); return sprintf('%s/%s.php.cache_clear.lock', $cacheDir, $class); }
This adjustment directs the cache to a temporary system directory instead of the original cache directory, bypassing the locked file. It allows the installation process to complete without any issues.
After successfully installing PrestaShop, it's crucial to revert the code to its original state. If you don't, you might encounter errors related to renaming cache files in the back office after installing a module. Here's what you need to do:
AppKernel.php
file.getContainerClearCacheLockPath
function.By following these steps, you'll ensure that PrestaShop installs smoothly and functions correctly post-installation.
Encountering a technical error during a critical process like installing PrestaShop can be frustrating, but you can resolve it quickly with the right information. If you found this guide helpful, please share it with other PrestaShop users who might be experiencing the same issue. And remember, if you have any further questions or need additional assistance, the PrestaHero team is here to help!