Jump to content

Bad Gateway when opening a product page but not when browsing cms or category pages


rpaxtian

Recommended Posts

Since I started using prestashop version 8.x a few weeks ago, I'm talking about a clean installation, from scratch, I frequently get this error "502 Bad Gateway", if I'm browsing the product list and open a product I get this error, but only when I open the products because if I go back and enter any page of the CMS or in the prestashop categories it works normally. To do this I have to delete the cookies, my concern is that not all my clients know how to delete cookies. Is there a solution?

Captura de pantalla 2024-08-05 164534.png

Link to comment
Share on other sites

On 8/6/2024 at 3:52 AM, rpaxtian said:

Since I started using prestashop version 8.x a few weeks ago, I'm talking about a clean installation, from scratch, I frequently get this error "502 Bad Gateway", if I'm browsing the product list and open a product I get this error, but only when I open the products because if I go back and enter any page of the CMS or in the prestashop categories it works normally. To do this I have to delete the cookies, my concern is that not all my clients know how to delete cookies. Is there a solution?

Captura de pantalla 2024-08-05 164534.png

A "502 Bad Gateway" error in Prestashop can be caused by server issues or configuration problems. To fix it, try:

Checking server logs for detailed error information.

Clearing Prestashop’s cache and regenerating the .htaccess file.

Increasing PHP limits like max_execution_time and memory_limit.

Maybe any module cause the problem, Kindly check if there any module related to cms pages.

Thanks

Link to comment
Share on other sites

hace 7 horas, ZHSoft dijo:

First, open the DEBUG mode in the backend
Then open the product page and check the error message, which will help you locate the problem quickly.

 

1.thumb.png.bb27fccdcf28587b52b8950140518d03.png

 

 

When activating debug mode, it shows the following error which also appears in the server lgs

the following error appears even in the server logs:
Warning: file_exists(): open_basedir restriction in effect. File(/views/templates/hook/style.tpl) is not within the allowed path(s): (/var/www/vhosts/rpaxtian.com/:/tmp/) in /var/www/vhosts/rpaxtian.com/tienda.rpaxtian.com/classes/module/Module.php on line 2292

 

In other forum topics they say that this does not affect the operation.

 

but when opening a product page, it directly launches the 502 error page, exits prestashop to display that error page

Link to comment
Share on other sites

First, make sure the /views/templates/hook/style.tpl file exists?
Then, it may be a permission setting issue. Please set the following directories to recursive 755 permissions and try again.
/views/templates/hook/
/var/cache/

Finally, if it still doesn't work, please send your error to your server provider and ask them to set permissions.

Good luck.

Link to comment
Share on other sites

  • 2 weeks later...

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