SecondSight Posted September 24, 2022 Posted September 24, 2022 Hello, ๐ Some members have lost access to atย least one forum on my board (it's a forum you can access with at least 5 posts in the other forums)ย : they get a HTTP ERROR 500. As for me I don't have access problems to this forum. I upgraded yesterday to PHP 8. Is it possible it has something to do with it ? How should I proceed to fix this ? Thank you. ๐ ย
opentype Posted September 24, 2022 Posted September 24, 2022 First step is to check the error logs. They probably give clues what the cause is.ย
Jim M Posted September 24, 2022 Posted September 24, 2022 A 500 Internal Server error is very much like that of your car's check engine light. It says something is wrong but not what or where. You would need to review the server error log entry responsible for that error to gain insight to what is happening here. If you are unsure how, please contact your hosting provider.
SecondSight Posted September 24, 2022 Author Posted September 24, 2022 This is linked to PHP 8 since when I switch back to PHP 7.4 there is no more problems. There are two kind of errors in the error_log file : Quote AH01215: PHP Fatal error: ย Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/myboard/public_html/system/Db/Db.php on line 1075: /usr/local/cpanel/cgi-sys/ea-php80 and : Quote ModSecurity: collections_remove_stale: Failed to access DBM file "/var/cpanel/secdatadir/myboard-global": Permission denied [hostname "mycommunitydomainname.com"]ย For this last error, the solution is given here :ย "You can fix this by switching from mod_ruid2 to mod_suexec.ย
Randy Calvert Posted September 24, 2022 Posted September 24, 2022 (edited) Have you tried disabling all of your third party modifications and testing with a default theme to make sure there is not a plugin/application causing a problem? ย Regarding the PHP error... ย that's happening because the script is trying to use more memory than your PHP.ini allows (which is 134MB). ย My guess is there is a 3rd party resource again that is triggering this. ย And regarding the ModSecurity issue... ย I would personally disable mod_security. ย It breaks more than it fixes. ย But again, that's between you and your host. ย Edited September 24, 2022 by Randy Calvert
Marc Posted September 26, 2022 Posted September 26, 2022 As mentioned above, disable all 3rd party items and test this again. We are seeing many issues where 3rd party applications are not yet ready for PHP 8 unfortunately.
SecondSight Posted September 27, 2022 Author Posted September 27, 2022 I used only one third party application (Links). I updated it, then disabled it but it didnโt help.ย I will try a default theme.ย
Randy Calvert Posted September 27, 2022 Posted September 27, 2022 Check the times in which youโre seeing the 500 errors and match them to the error logs. Do they match one of those issues like php memory limit? ย If so, have your host increase the limit.ย You might also consider disabling mod_security. Againโฆ based on past experienceโฆ it causes more problems than it fixes.
Marc Posted September 27, 2022 Posted September 27, 2022 Please do also check your server error logs at the time its happening as mentioned above
SecondSight Posted September 29, 2022 Author Posted September 29, 2022 I've disabled third party applications (I only have one : Links), I disabled mod_security, I'm using now a default theme, I've set PHP memory_limit to 512M, I deleted the forum they can't access after moving all the topics in a new forum, but these members don't have access to the new forum either... These members say they see this error message : (I've enabledย display_errors momentarily) Quote Fatalย error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) inย /home/myboard/public_html/system/Db/Select.phpย on lineย 503 In the server error_log, I have the same error messages + the members' IP.ย By the way, do you know why there is a number after the member's IP (in bold, below) ? Quote [cgi:error] [pid 16881] [client 93.33.18.93:57492] AH01215: PHP Fatal error: ย Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/myboard/public_html/system/Db/Db.php on line 1075: /usr/local/cpanel/cgi-sys/ea-php80, referer: https://forums-enseignants-du-primaire.com/topic/334741-les-bosseuses-2/page/628/ Any other ideas are welcome... Thank you. ๐
opentype Posted September 29, 2022 Posted September 29, 2022 Can you replicate this issue if you login as one of those members? If so, itโs certainly interesting that it is member-based. I would then try to figure out whatโs different about a member than has this issue vs. one that does not have it. It should give an indication about what is causing the error.ย
SecondSight Posted September 29, 2022 Author Posted September 29, 2022 Hello, ๐ I searched for their account in the ACP and used the featureย "Account actions/Sign in as..."ย andย I was able to access the forums without any problems... Does it mean the problem comes from their computer and phone ? But when I use PHP 7.4, they don't have problems... Thank you,ย ๐
Marc Posted September 29, 2022 Posted September 29, 2022 If the issue is only present when switching PHP version, its likely there is an error somewhere that is causing it to timeout. The most likely scenario is that is 3rd party somewhere that is running. I would need an example user to take a look, and for you server to be using PHP 8 so we can replicate the problem
Recommended Posts