Hello good morning my librephonia.com website is giving me a 500 error when trying to access the backoffice (The frontend looks good always, never fails).
The server returns this error: PHP Fatal error: Cannot redeclare class AppKernel in /srv/neoatica/hosting/00000075/librephonia.com/web/www/app/AppKernel.php on line 0
We have tried everything by uninstalling module, deleting caches etc ... and the only thing that works is restarting Apache. As soon as we restart the web server we can re-enter the backoffice without problems.
Here I leave the server data:
Linux Server Information # 1 SMP Debian 4.9.88-1 + deb9u1 ~ bpo8 + 1 (2018-05-13) x86_64
Server software version: Apache PHP version: 5.6.40-0 + deb8u4
Memory limit: 150M
Max. Execution: 30 Max
size for file upload: 16M
Can somebody help me? I've been looking for information for months and asking in forums and nobody hits the key. Any ideas?
Thank you very much to all
Hi @racfalit,
Could you please provide us with more info? We need more details to understand how we can reproduce your issue:
Don't you know how to get this information? Please read the following article:
http://build.prestashop.com/howtos/misc/how-to-create-bug-report/
Thanks!
I don't know when I will give the error again because it is random. I'm going to send you everything I can recolpilate from what you ask me to see if it works. Thnks
@racfalit, in the meantime, could you please try to clear cache manually by deleting all the folder into var/cache (prod & dev).
Thanks!
Hello, it has been 1 day without giving the error, so I cannot give you everything you ask me until I fail again. These are the data that I can give you right now
Host:
Librephonia.com
PHP Error log:
[Thu Aug 01 11:16:06.070723 2019] [:error] [pid 5399] [client 77.224.228.215:51514] PHP Fatal error: Cannot redeclare class AppKernel in /srv/neoatica/hosting/00000075/librephonia.com/web/www/app/AppKernel.php on line 0, referer: https://www.librephonia.com/admin443a84cyn/index.php?controller=AdminCustomerThreads&token=9eb4e891fd6ed96aba924541e78c3bdf
[Thu Aug 01 11:16:06.370832 2019] [:error] [pid 5404] [client 77.224.228.215:51521] PHP Fatal error: Cannot redeclare class AppKernel in /srv/neoatica/hosting/00000075/librephonia.com/web/www/app/AppKernel.php on line 0, referer: https://www.librephonia.com/admin443a84cyn/index.php?controller=AdminCustomerThreads&token=9eb4e891fd6ed96aba924541e78c3bdf
[Thu Aug 01 11:16:15.227398 2019] [:error] [pid 5328] [client 77.224.228.215:51532] PHP Fatal error: Cannot redeclare class AppKernel in /srv/neoatica/hosting/00000075/librephonia.com/web/www/app/AppKernel.php on line 0, referer: https://www.librephonia.com/admin443a84cyn/index.php?controller=AdminOrders&token=07def98ac76ecf3a1017655845a7e86d
thanks for your attention
@racfalit, thanks for your feedback.
Waiting for the new PHP error log & debug mode report, if this issue occurs again.
Thanks!
Hello good afternoon. He has given me the ruling I mentioned earlier. No module or any modification was being installed, we have simply tried to enter the backoffice. Everything I put before is the same thing that happened today.
I attached photos so they can help see what it can be.
Photo1: When I try to log in sometimes I get this screen.
Photo2: When photo1 does not come out this (this is more usual)
Photo3: This is the capture when I put prestashop in debug mode.
Being a store where we are selling every day I can not leave it with the error and we have restarted the web server and it works, but I need to know the problem so that it does not happen again. Thank you very much for everything and I hope you can help me



@racfalit, do you have opcache enabled on your server?
Thanks!
I have asked the hosting and they tell me that it is NOT enable
@racfalit, Could you please try to run those command lines to remove the cache:
rm -fR /Projet_PrestaShop/var/cache/*
php -d memory_limit=-1 ./bin/console cache:clear
php -d memory_limit=-1 ./bin/console cache:clear --env=prod
Thanks!
hello,
Do I try it when I fail? or at any time
@racfalit, your issue is solved after runing those commands?
Thanks!
I have tried all 3 commands and still giving the 500 error as always.
We have restarted the web server and it works, I'm desperate
@racfalit, have you tried to contact your host about this issue?
It could be a server issue because re-starting the web server solves your issue.
Thanks to check with them & feedback.
Hello, in the hosting, they tell me that they don't see any problem. I have failed again, right now it gives error 500 and we have not restarted the web server.
Can I pass you PLEASE the url user and password of prestashop and FTP data so that you can PLEASE see it with your own eyes?
Thank you very much for your attention.
@racfalit, yes you can send me the link.
This is a public space.
You can provide me the credentials by email.
My address mail: khouloud.[email protected]
Let's be safe!
Thanks!
I have already sent it to you by mail. Thank you very much I hope you find the solution
@racfalit, I just received the email.
I will check & feedback.
I checked your log file & I find this
php.CRITICAL: Fatal Error: Allowed memory size of 157286400 bytes exhausted (tried to allocate 262187 bytes)
You need to increase the memory_limit & max_execution_time.
php.DEBUG: Warning: file_exists(): open_basedir restriction in effect. File(/srv/neoatica/hosting/00000075/xxx/web) is not within the allowed path(s): (/srv/neoatica/hosting/00000075/xxx/web/www/:/tmp/)
This a permission warning, you need to check the permissions of your files or maybe you need to use a different /tmp directory, such as var/tmp
Hi @racfalit,
Since we had no news from you for more than 30 days, I'll close this ticket. Feel free to open another one if you can give specific details.
Thanks!