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 4
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

  • 1 month later...

It looks like your HTTP 500 error during the PrestaShop 8.1.7 installation might be related to PHP configuration, file permissions, or missing modules. A few things to check:

Ensure error reporting is enabled in php.ini (display_errors = On) to get more details.

Check Apache/PHP logs for more insights (WAMP/logs or server error logs).

Confirm that required PHP extensions (like intl, zip, gd, curl) are enabled.

Try setting folder permissions to 755 and files to 644.

If you are hosting media-related content like Pikashow , server configurations are crucial for smooth performance. Have you tried a fresh install with default settings to rule out conflicts?

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...