Jump to content

The server returned a "500 Internal Server Error"


rezan

Recommended Posts

Hello,

I used Debian 8 before and I changed my vps operation system to ubuntu 18.04

after I restore the database and uploaded the files all was alright

I entered to admin panel, but after that Something is broken in som links fx. performance and installed modules

and it show

Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused. 

I deleted cache from var/cache but that did not help

I use PHP Version 7.2.15-0ubuntu0.18.04.2

What can I do

A video showing the problem inserted in attachment

When i active  define('_PS_MODE_DEV_', false); there is no problem with all links

 

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

'500 Internal Server Error' can be caused by million different things. You need to read the more detailed error message from error log file of the web server.

I assume you are using Apache web server. In Ubuntu Apache's error log is in /var/log/apache2/error.log

Cause the error and see what error message is saved to the error log file.

  • Like 1
Link to comment
Share on other sites

Hello, I reinsstall my VPS to debian again

this is the error log

root@vps229681:/var/log/apache2# sudo tail -100 /var/log/apache2/error.log
[Fri Mar 29 20:12:31.923749 2019] [mpm_prefork:notice] [pid 3673] AH00169: caught SIGTERM, shutting down
[Fri Mar 29 16:14:28.768481 2019] [suexec:notice] [pid 641] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Fri Mar 29 16:14:29.920172 2019] [:notice] [pid 716] mod_ruid2/0.9.8 enabled
[Fri Mar 29 16:14:29.927761 2019] [mpm_prefork:notice] [pid 716] AH00163: Apache/2.4.10 (Debian) mod_fcgid/2.3.9 OpenSSL/1.0.1t configured -- resuming normal operations
[Fri Mar 29 16:14:29.927796 2019] [core:notice] [pid 716] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 29 16:23:42.313150 2019] [mpm_prefork:notice] [pid 716] AH00171: Graceful restart requested, doing restart
[Fri Mar 29 16:23:43.069640 2019] [:notice] [pid 716] mod_ruid2/0.9.8 enabled
[Fri Mar 29 16:23:43.069988 2019] [mpm_prefork:notice] [pid 716] AH00163: Apache/2.4.10 (Debian) mod_fcgid/2.3.9 OpenSSL/1.0.1t configured -- resuming normal operations
[Fri Mar 29 16:23:43.070003 2019] [core:notice] [pid 716] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 29 16:25:05.697061 2019] [mpm_prefork:notice] [pid 716] AH00171: Graceful restart requested, doing restart
[Fri Mar 29 16:25:05.903049 2019] [:notice] [pid 716] mod_ruid2/0.9.8 enabled
[Fri Mar 29 16:25:05.903507 2019] [mpm_prefork:notice] [pid 716] AH00163: Apache/2.4.10 (Debian) mod_fcgid/2.3.9 OpenSSL/1.0.1t configured -- resuming normal operations
[Fri Mar 29 16:25:05.903522 2019] [core:notice] [pid 716] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 29 16:25:10.657152 2019] [mpm_prefork:notice] [pid 716] AH00171: Graceful restart requested, doing restart
[Fri Mar 29 16:25:10.865577 2019] [:notice] [pid 716] mod_ruid2/0.9.8 enabled
[Fri Mar 29 16:25:10.865963 2019] [mpm_prefork:notice] [pid 716] AH00163: Apache/2.4.10 (Debian) mod_fcgid/2.3.9 OpenSSL/1.0.1t configured -- resuming normal operations
[Fri Mar 29 16:25:10.865977 2019] [core:notice] [pid 716] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 29 16:25:18.108960 2019] [mpm_prefork:notice] [pid 716] AH00171: Graceful restart requested, doing restart
[Fri Mar 29 16:25:18.344036 2019] [:notice] [pid 716] mod_ruid2/0.9.8 enabled
[Fri Mar 29 16:25:18.349458 2019] [mpm_prefork:notice] [pid 716] AH00163: Apache/2.4.10 (Debian) mod_fcgid/2.3.9 OpenSSL/1.0.1t configured -- resuming normal operations
[Fri Mar 29 16:25:18.349479 2019] [core:notice] [pid 716] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 29 16:25:19.044269 2019] [mpm_prefork:notice] [pid 716] AH00171: Graceful restart requested, doing restart
[Fri Mar 29 16:25:19.255206 2019] [:notice] [pid 716] mod_ruid2/0.9.8 enabled
[Fri Mar 29 16:25:19.256944 2019] [mpm_prefork:notice] [pid 716] AH00163: Apache/2.4.10 (Debian) mod_fcgid/2.3.9 OpenSSL/1.0.1t configured -- resuming normal operations
[Fri Mar 29 16:25:19.256957 2019] [core:notice] [pid 716] AH00094: Command line: '/usr/sbin/apache2'

 

Link to comment
Share on other sites

Did you try to cause the 500 error on purpose and then right after that take a look at the Apache error log file?

If nothing shows up in the Apache error log, then also try to take a look at your PrestaShop error log in .../yourprestashopinstalldir/var/logs/prod.log (or dev.log). Anything there?

  • Like 1
Link to comment
Share on other sites

in var/logs/prod.log I finde


[2019-03-30 09:54:36] request.INFO: Matched route "admin_module_manage". {"route":"admin_module_manage","route_parameters":{"category":null,"keyword":null,"_controller":"PrestaShopBundle\\Controller\\Admin\\Improve\\ModuleController::manageAction","_legacy_controller":"AdminModulesManage","_legacy_link":["AdminModulesManage","AdminModulesSf"],"_route":"admin_module_manage"},"request_uri":"https://www.infinity-shisha.dk/admin/index.php/improve/modules/manage?token=337224d7311ecbb0b8a1e715d4b0603d","method":"GET"} []
[2019-03-30 09:54:36] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2019-03-30 09:54:37] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\UndefinedFunctionException: "Attempted to call function "apc_fetch" from namespace "Doctrine\Common\Cache"." at /home/admin/web/infinity-shisha.dk/public_html/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php line 41 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException(code: 0): Attempted to call function \"apc_fetch\" from namespace \"Doctrine\\Common\\Cache\". at /home/admin/web/infinity-shisha.dk/public_html/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php:41)"} []
[2019-03-30 09:54:37] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} []

 

Link to comment
Share on other sites

The critical 'Uncaught PHP Exception' appears to be related to APC Caching. I'm not familiar with it and I have never tried it.

Try to turn APC Caching off if you are using it (you can find it in Advanced Parameters / Performance / Caching - see the attached screenshot).

Otherwise I can only advice you to google the issue further.

Screenshot_20190330_142632.png

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Does anyone knows which table I need to edit in DB to disable cache as I've got a 500 error in all admin pages apart fro the dashboard due to apc.

PHP Fatal error: Attempted to call function "apc_fetch" from namespace "Doctrine\\Common\\Cache"

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