Jump to content

Strange debug / 500 error


CJH

Recommended Posts

I am running Presta 8.0.2 and was using php 7.4, which is very old. Presta 8.x runs with a recommended php 8.1, so I upgraded to this version (being forced to by my hosting servive). Everything works fine, except ...

With debug switched on, both website and back office work fine. If I switch it off, the website is fine, all back office works fine, except for the dashboard which returns the 500 error. The problem goes away/comes back with the debug turned on/off.

I've tried clearing the cache and deleting contents of var, immediately before and immediately after turning debug off, but it makes no difference.

Any ideas what to try next? Is it a problem running the website with debug permanently on?

Link to comment
Share on other sites

Log says (7 identical entries at the same time, then other sets of identical entries at earlier times), with a green 'information only':

API Call received = /[my login address]/index.php?controller=apiSecurityPsMbo&token=ee37f01436d1b46ccc246a505c21f9c4

I don't know how to interpret this

Link to comment
Share on other sites

I'm looking in Advanced Parameters / Logs ... that's the right place, yes?

There are no other messages other than the one above (except for a couple notifying of changes to products made along the way, being 'information only'). No fatal errors.

So am I looking at the wrong set of logs? I don't know how to see any others.

Sincerely, thanks for taking the time to help

Link to comment
Share on other sites

Posted (edited)
1 hour ago, CJH said:

I am running Presta 8.0.2 and was using php 7.4, which is very old. Presta 8.x runs with a recommended php 8.1, so I upgraded to this version (being forced to by my hosting servive).

you should look for a hoster who does not force you.
Updates: you check at best locally, over localhost or have a test install in your server.
Error log is often under var > logs > Apache or nginx

Edited by Nickz (see edit history)
Link to comment
Share on other sites

Different host already selected ... but for now, I must solve this problem because it will otherwise just transfer. And php 8.1 is supposed to be valid for Presta 8.x.

Thanks for the tip about error logs; I didn't know that. The most recent one reads:

*ERROR*     v8.0.3    2025/05/04 - 11:36:11: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbs10257526.la1c_seor_history' doesn't exist at line 151 in file classes/db/DbPDO.php

Under today's date, over 200 of these lines at different times.

That's more informatioon ... but I have no idea what to do with this or what it means. Very many thanks for the help ...

Link to comment
Share on other sites

I also see I originally posted I was running Presta 8.0.2 - which was my mistake typo; 8.0.3 is correct, as in this error log

Link to comment
Share on other sites

2 hours ago, CJH said:

Different host already selected ...

Upload the shop to the hoster allowing for php7.4 and have all requirements in place saves you trouble and gives you time to redo your shop newer than before. 

Link to comment
Share on other sites

Nicz - thanks, but I wish to solve this. Starting again, instead of perhaps migrating, will take me much longer to add theme/tweaks and so on. It's a big site with hundreds of products.

Daresh - SEO module; I'll look at taking anything like this out and see what happens. Thanks

Link to comment
Share on other sites

I have a module from mypresta by Vekia that produces 'pretty clean urls' - used it for years without trouble. If I disable this, (and delete cache and delete var contents), back office starts working fully with debug off. But the website now goes down with 500 error. 

I might expect internal links to fail without the urls being correct (no module), but not the whole site (including the home page, which is only the domain name after all). Debug turned on again and the website works once more, whether the module is used or not. Of course, back office dashboard and stats fail again.

With the module disabled and back office fully working with debug off, any ideas how to get the website running again?

 

Link to comment
Share on other sites

I dropped the website back to php 7.4 and turned on the module (everything worked), turned off debug (everything worked), cleared cache/car (everything worked), went back to Prestashop's preferred php 8.1 (back to failures), turn on debug and everything worked again.

For now, I must run with debug turned on until I can make other arrangements. Unless anyone has a suggestion for dealing with the 'module off, website totally fails'

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