Jump to content

1: HTTP 500 - error - {"success":true,"message":""} 1st installation.


Recommended Posts

I am sorry, but i didnt found any solution.

1st installation Prestashop 8.1.7 (newset) to WampServer 3.3.5 (Windows 11 64bit version), i change PHP version and some else steps, but i get this mistake: 1: HTTP 500 - error - {"success":true,"message":""}

Same problem i get by installation on our web server.

Somebody solve it?

chyba_prestashop.png

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

When you look in your error log you will see the following error:

PHP Fatal error:  Uncaught ErrorException: Warning: 
require(C:\\xampp\\htdocs\\var\\cache\\dev\\ContainerJiLuDQW\\getSwiftmailer_EmailSender_ListenerService.php): 
Failed to open stream: No such file or directory in 
C:\\xampp\\htdocs\\var\\cache\\dev\\ContainerJiLuDQW\\appAppKernelDevDebugContainer.php:2243

The solution that Endriu mentions and that for me worked is editing the file /app/AppKernel.php 

Change the function getContainerClearCacheLockPath() from

    protected function getContainerClearCacheLockPath(): string
    {
        $class = $this->getContainerClass();
        $cacheDir = $this->getCacheDir();

        return sprintf('%s/%s.php.cache_clear.lock', $cacheDir, $class);
    }

to

    protected function getContainerClearCacheLockPath(): string
    {
        $class = $this->getContainerClass();
		$cacheDir = sys_get_temp_dir();

        return sprintf('%s/%s.php.cache_clear.lock', $cacheDir, $class);
    }

 

  • Like 5
Link to comment
Share on other sites

  • 4 weeks later...
On 10/14/2024 at 7:04 PM, musicmaster said:

When you look in your error log you will see the following error:

PHP Fatal error:  Uncaught ErrorException: Warning: 
require(C:\\xampp\\htdocs\\var\\cache\\dev\\ContainerJiLuDQW\\getSwiftmailer_EmailSender_ListenerService.php): 
Failed to open stream: No such file or directory in 
C:\\xampp\\htdocs\\var\\cache\\dev\\ContainerJiLuDQW\\appAppKernelDevDebugContainer.php:2243

The solution that Endriu mentions and that for me worked is editing the file /app/AppKernel.php 

Change the function getContainerClearCacheLockPath() from

    protected function getContainerClearCacheLockPath(): string
    {
        $class = $this->getContainerClass();
        $cacheDir = $this->getCacheDir();

        return sprintf('%s/%s.php.cache_clear.lock', $cacheDir, $class);
    }

to

    protected function getContainerClearCacheLockPath(): string
    {
        $class = $this->getContainerClass();
		$cacheDir = sys_get_temp_dir();

        return sprintf('%s/%s.php.cache_clear.lock', $cacheDir, $class);
    }

 

This work perfectly, thank you

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

This workaround works because it changes the cache lock file location from PrestaShop's default cache directory (getCacheDir()) to the system's temporary directory (sys_get_temp_dir()), which is always writable by PHP. The original issue occurs when PrestaShop tries to clear the cache, but due to missing files, incorrect permissions, or locked processes, it fails to regenerate the necessary cache files, leading to the "Failed to open stream" error. By redirecting the lock file to a system-managed temporary directory, the issue is bypassed, ensuring that the cache clearing process can proceed without being blocked by permission restrictions or file system conflicts, particularly in Windows environments like XAMPP. However, this is a workaround, and should be used with caution.

Link to comment
Share on other sites

  • 3 months later...
On 10/14/2024 at 7:04 PM, musicmaster said:

When you look in your error log you will see the following error:

PHP Fatal error:  Uncaught ErrorException: Warning: 
require(C:\\xampp\\htdocs\\var\\cache\\dev\\ContainerJiLuDQW\\getSwiftmailer_EmailSender_ListenerService.php): 
Failed to open stream: No such file or directory in 
C:\\xampp\\htdocs\\var\\cache\\dev\\ContainerJiLuDQW\\appAppKernelDevDebugContainer.php:2243

The solution that Endriu mentions and that for me worked is editing the file /app/AppKernel.php 

Change the function getContainerClearCacheLockPath() from

    protected function getContainerClearCacheLockPath(): string
    {
        $class = $this->getContainerClass();
        $cacheDir = $this->getCacheDir();

        return sprintf('%s/%s.php.cache_clear.lock', $cacheDir, $class);
    }

to

    protected function getContainerClearCacheLockPath(): string
    {
        $class = $this->getContainerClass();
		$cacheDir = sys_get_temp_dir();

        return sprintf('%s/%s.php.cache_clear.lock', $cacheDir, $class);
    }

 

Helped like a charm. Thanks thanks

Link to comment
Share on other sites

  • 4 months later...

I did the fix and continued on the install.  Looks like it worked. The website comes up. I cannot get into the back office. the admin folder is still called admin.  If I go to that page I get.

 

500 error and it cannot find the page.

I thought it would rename the admin folder but did not.  I wonder if something did not finish.  I renamed the install directory so it does not intefere with the BO.

 

Any ideas?

 

Link to comment
Share on other sites

On 10/26/2025 at 8:33 PM, oshoot said:

"...I cannot get into the back office. the admin folder is still called admin.  If I go to that page I get.
500 error and it cannot find the page.
I thought it would rename the admin folder but did not.  I wonder if something did not finish....
Any ideas?"

On my first try installs and fails of using Softaculous to install Prestashop a day or so ago, I had a similar thing happening where the front-end was working fine but the admin section was returning a 500 error. Softaculous was installing the 9.0.0 version of Prestashop which had big issues. I manually installed Prestashop 9.0.1 and then the admin area worked great.

You didn't mention the version you are installing so I just thought I'd give you my similar experience that I had with my first time toying with Prestashop. The cool thing about having Softaculous install Prestashop is that you can name the admin folder to whatever you want instead of that super long mess of an admin folder name the manual Prestashop install forces on you.

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...