Jump to content
Stéphane V

ERROR 500 without debug but NO ERROR in debug mode

Recommended Posts

HI,

Using Prestashop 1.7.5.1 with a 1-click install on OVH :

  • I can access to the public shop : OK
  • I can't access to the admin URL : Error 500, without any message, (followed by a Error 404 for the favicon, i think this is not the issue)

I activated the debug mode in config/defines.inc.php with

define('_PS_MODE_DEV_', true);

And I got the complete access to the admin area, without any Error 500...

Where is the error gone ?

--> If I revert _PS_MODE_DEV_ to false, I get the error 500 back, even when deactivating all non-prestashop modules and putting the default theme...

I did not find any error 500 in the server log (even when it happens with _PS_MODE_DEV_ set to false).

How can I diagnose such an error ? Any idea ? I take in consideration even the "fancy" ideas... because I have no more ideas to solve this....

 

Capture d’écran de 2019-05-03 12-01-10.png

Capture d’écran de 2019-05-03 12-03-35.png

Edited by Stéphane V (see edit history)

Share this post


Link to post
Share on other sites

You need to delete the contents of  var/cache/ manually, via ftp/file manager. 

Another thing to check is file/folders permissions. Make sure they are set to 0644 for files and  0755 for folders.

Edited by rdy4ever (see edit history)

Share this post


Link to post
Share on other sites

Great ! This solved my issue ! 🙂 Thank you so much

For the record, i deleted www/cache, but not www/var/cache that was including so many smarty pre-compiled files... messing all around with the latest version of the uploaded theme 🙂

PS : so strange taht the "clear cache" in the admin "performances" page did not purge that folder www/var/cache (why ?)

Share this post


Link to post
Share on other sites
On 5/4/2019 at 11:09 PM, Stéphane V said:

For the record, i deleted www/cache, but not www/var/cache that was including so many smarty pre-compiled files... messing all around with the latest version of the uploaded theme 🙂

PS : so strange taht the "clear cache" in the admin "performances" page did not purge that folder www/var/cache (why ?)

It never does, a completely useless feature that PS seems have no plan on ever fixing. Although it may clear the default theme cache, never used the default theme so not sure about that.

Edited by jetx (see edit history)

Share this post


Link to post
Share on other sites

I'm having a similar issue, unable to get into the administration interface and getting a 500 error.

I've connected to the server with Filezilla and deleted the www/cache, then refreshed the admin screen, still getting a 500. I'm very new to this, so I'm not sure what the file/folders permissions mentioned above refer to, could anyone walk me through what else I can try to get it running again?

I've got Prestashop 1.7.5.1, with PHP version 7.2.

Share this post


Link to post
Share on other sites

inside var/cache there are one or two folders. open folder named prod and delete its contents.

Share this post


Link to post
Share on other sites

okay, I've deleted the contents, it took a while processing them all, now there's only 7 files left, PHPs, PEM and META. I've tried refreshing the admin panel, still getting the 500 error, is there another step?

Share this post


Link to post
Share on other sites
1 hour ago, GeekyFuroshiki said:

okay, I've deleted the contents, it took a while processing them all, now there's only 7 files left, PHPs, PEM and META. I've tried refreshing the admin panel, still getting the 500 error, is there another 

So you can just delete the contents via your hosting cpanel in one click. I wouldn't use filezilla. Anyway if you deleted the cache (prod and dev directory contents) try using another browser. If it is still a 500 then it's not cache. Check permissions though. Use your cpanel file manager to quickly see if the files are 644 and directories 755. If not then probably modsec is preventing access. If you see permissions like 777 then that may be your problem. A simple command via SSH using putty or your cpanel is the best method. Or ask your hosting as you may not have sufficient permissions.

Or you may have another issue. You can ask your hosting to check the server log.

Share this post


Link to post
Share on other sites

Sorry to sound a dummy, but how do you delete via hosting cpanel? I haven't found anything in my OVH control panel yet that lets me get at individual parts the way filezilla does.

Share this post


Link to post
Share on other sites

Phew, I found the ftp editor, used that to delete the var/cache/prod, still no change, tried it in Edge too, still 500. Where do I find and change the permissions? Is that a function of net2ftp? How do I do a SSH command via the cpanel? I'll look into putty if I can't get that to fly.

Share this post


Link to post
Share on other sites

I'm not at my pc so can't offer much detail. Your cpanel should have a terminal app which you can use to run a command to change file and directory permissions. You should ask your hosting to do that because it's fairly technical and by the sounds of it you probably don't have ssh experience.

 

But if you found file manager in your cpanel (I have never heard of your hosting company so I don't know if it is a standard cpanel) you can see what permissions are in place for files and directories. Are they 644 and 755?

Share this post


Link to post
Share on other sites

I checked them in filezilla, they all seem to be 644 and 755,. yes. I've raised a ticket with OVH to get it checked out, too

Share this post


Link to post
Share on other sites

Server log will be your best bet then. It will indicate what triggered the 500. New install right? 

Share this post


Link to post
Share on other sites

Not brand new, I installed it a couple of months back but haven't had the chance to get started on designing the front end until now.

Share this post


Link to post
Share on other sites
On 5/4/2019 at 1:32 PM, rdy4ever said:

You need to delete the contents of  var/cache/ manually, via ftp/file manager. 

Another thing to check is file/folders permissions. Make sure they are set to 0644 for files and  0755 for folders.

It worked for me too. Thank you.

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More