Jump to content

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)
Link to comment
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 ?)

  • Like 1
Link to comment
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)
  • Like 1
Link to comment
Share on other sites

  • 8 months later...

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.

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

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

Link to comment
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?

Link to comment
Share on other sites

  • 4 months later...
  • 4 weeks later...

Worked also for me , 100000 thanks !!
So i get to be subscriber in this magic forum !!

i rename var/cache/prod to var/cache/prod.old and var/cache/des to var/cache/dev.old
it's queekly, and if, after changing _PS_MOD_DEV_ to false, everything it's OK, i delete them *.old

On OVH the file are set to 0604 and the folder 0705
it's a problem ?

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 3 months later...
On 1/16/2020 at 10:14 PM, GeekyFuroshiki said:

Fixed it - I deleted the module and reinstalled it.

Hello

I've the exact same problem! It happened after I changed its registar from Godaddy to Dreamhost, the site was already hosted on DH.

Updating from 1.7.6.4 to 1.7.6.8 didn't help , still the same 500 error

Deleting the contents of  var/cache/ manually, via ftp/file manager, takes along time and doesn't solve my problem.

I did all the other things; cleaning cache from cloudflare, Dreamhost, Prestashop, My site etc, still no joy.

I still don't understand where is the module manager file is located.

This link goes 500 in normal mode but works fine in debug so I got no debug info.

https://www.mydomain.com/myshop_ps/admin9xxxxx/index.php/improve/modules/manage?_token=xxxxx

I don't understand the server logs, or maybe something about "legacy blabla"

Please can you tell what module -name and path- you deleted then reinstalled.

From where did you get the "clean module"?

Thanks

Link to comment
Share on other sites

3 hours ago, MJTWEB said:

Deleting the contents of  var/cache/ manually, via ftp/file manager, takes along time and doesn't solve my problem.

Instead of deleting rename the folder first so that a clean cache get generated. This should really solve the problem.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

12 hours ago, JBW said:

Instead of deleting rename the folder first so that a clean cache get generated. This should really solve the problem.

Hello

Thanks for the tip but I have tried that 3 times already and I still get the 500 error.

Where do I find the "module manager" file so I can check it is shmod to 775.

Since I updated to 1.7.6.8 when I go into debug mode and of course then the module manager works fine, have some kind of debug help and in the "symphony profiler" and in "translation" I found this strange message "AdminCatalogNotification2 The root category of the shop %shop% is not associated with the current shop. You can't access this page. Please change the root category of the shop.". I have no idea what that means.

I look thought the error logs and nothing about the 500 error. I'm not sure on how to use the thing. The debug tab is empty of messages.

In "Translation" I found this about "caches"

en-USAdminAdvparametersNotification3(you must install the [a]Memcache PECL extension[/a])(you must install the [a]Memcache PECL extension[/a])

en-USAdminAdvparametersFeature3Memcached via PHP::MemcachedMemcached via PHP::Memcached

en-USAdminAdvparametersNotification3(you must install the [a]Memcached PECL extension[/a])(you must install the [a]Memcached PECL extension[/a])

en-USAdminAdvparametersFeature3APCAPC

en-USAdminAdvparametersNotification3(you must install the [a]APC PECL extension[/a])(you must install the [a]APC PECL extension[/a])

en-USAdminAdvparametersFeature3XcacheXcache

en-USAdminAdvparametersNotification3(you must install the [a]Xcache extension[/a])

Any ideas what should be my next step to locate the culprit for the 500 error as for in debug mode everything is working ok and don't generate any message?

Should I try to remove my ssl certficate going back to http and see what happens? 

What log, precisely should I look at, I tried the server logs, but only found something about "legacy something", 

I'm going to generate the 500 error ten times in a row, it should finally register somewhere.

Thanks for your advices.

Same time later with was is left of my brain I changed define.inc.php to display errors even with debug OFF, I'm a genius, yes I fell like it..lol

Used module manager and got this


Warning: Use of undefined constant MCRYPT_MODE_CBC - assumed 'MCRYPT_MODE_CBC' (this will throw an Error in a future version of PHP) in /home/user/mysite.com/myprestashop_ps/modules/psmegamenu/psmegamenu.php on line 46

Warning: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' (this will throw an Error in a future version of PHP) in /home/user/mysite.com/myprestashop_ps/modules/psmegamenu/psmegamenu.php on line 46

But It's 2 am here so I will look at that later.

Certainly waiting for your advice has to what to do with those "ligne 46" is wise.

Good night/Good day to you Sir.

 

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

15 hours ago, JBW said:

Instead of deleting rename the folder first so that a clean cache get generated. This should really solve the problem.

SOLVED

Found it!
It was all due to a free module from prestabrain dot com "Free Prestashop Page Builder", I installed it BEFORE switching to full SSL and as the thing never worked I de-installed it, or so I though, in fact it never de-installed itself and my module manager was still working ok,  then when I switched to SSl, some months later and I had all forgotten about it, the 500 error started !

Just for checking I tried to re-instal it, now on full strict SSl and it gave me instantly a warning: 

Use of undefined constant MCRYPT_MODE_CBC - assumed 'MCRYPT_MODE_CBC' (this will throw an Error in a future version of PHP)
[INTERNAL] /home/missxtredh/missxtreme.com/missxtreme_ps/modules/psmegamenu/psmegamenu.php line 46 - Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' (this will throw an Error in a future version of PHP)

So now I have created a dir: modules/delete_me where I stuffed the 2  dir created by this addon from hell "psmegamenu and pspagebuilder" and there are now burning in hell with the rest of the bad addons ever created, cursed by all webmasters of this Universe.

I have detailed the maneuver as it might help some other semi-noob like me. 

Thanks for the help.

In Hell they burn...Ha ha ha ha

Link to comment
Share on other sites

  • 3 weeks later...

Before anything ELSE; just try to optimixe optimu server settings

memory_limit = 512M
max_execution_time = 300
max_input_time = 300
upload_max_filesize = 20M
post_max_size = 20M
max_input_vars = 10000   !!!!!! (solved server 500 error with ps_mod module, since this is the module of the shop modules, need lots of files to open, a obvious choice)

Link to comment
Share on other sites

  • 1 month later...
On 5/4/2019 at 5:02 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.

Thanks a lot buddy. thanks for your valuable time

Link to comment
Share on other sites

  • 2 months later...
  • 5 months later...
  • 6 months later...
On 8/28/2021 at 8:02 PM, Zohaib-fk said:

Thanks

Works fine with 2 folders rename var/cache/dev and var/cache/prod . It will be generated again when doing clear cache from the performance menu option.

thanks. Just did as u told here, and after disabling debug mode it worked. no error 500 anymore.

Link to comment
Share on other sites

  • 5 months later...

Can you enable the display errors option from web hosting Cpanel, it will help show an error message instead only error code 500. Also, share a screenshot if the error message is visible on the webpage.

When I changed the domain or moved the website from localhost to web hosting or change the web hosting account, I faced similar issues in past. I cleared the cache and updated the ps_shop and ps_configuration table with the right URL values.

Link to comment
Share on other sites

  • 2 months later...

Hi I have the same problem with prestashop 1.7.8.6.

If I go into modules page whitout debug mode on I have e white page , If I go to the modules page after enabling debug mode, I can open the page.

I have cleared and deleted the folder in /var/cache/ and all the folder/files permission are set to  0755 0644

How can I fix the problem ?

With debug mode on I haven't any error:

 

immagine.thumb.png.778bbab738dd1a2798cbabba295d144b.png

 

Link to comment
Share on other sites

  • 2 months later...
On 10/2/2020 at 8:30 AM, JBW said:

Instead of deleting rename the folder first so that a clean cache get generated. This should really solve the problem.

Just a quick post to say it is worked for me.

It is really important to rename folder instead of deleting it before switching to false debug mode back. When I was just deleting cache folder, it kept 500 error every time.

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