Hi there,
So, I am running a forum using 2.019, PHP 8.2 (upgraded this weekend)
On Thursday, I clicked on my forum to find the dreaded White Screen of Death on the Home Page. I contacted my host, and they investigated the issue. After a couple of hours, they figured out it may have been an issue with PHP. So they changed the PHP to 8.2, and voila, my Home page is back, and everything seems fine.
However, one board on my forum still shows a blank page when you click on it. The sub-forums of that board show up fine when you click on them, but the board doesn't - it just turns up a blank page.
Has anyone experienced this before, and if so, how did you resolve it?
Thanks for your help.
Check your server error log; it should give you exactly what error is happening.
Apart from that: specify your SMF version and the mods you are using....
Since it's already "fixed" it might be difficult to solve the original issue, but if you have access to your server error logs you should look at the HTTP 500 errors there.
https://wiki.simplemachines.org/smf/What_the_white_screen_of_death_means
This.
Quote from: @rjen on October 07, 2024, 10:34:05 AMand the mods you are using....
If you disable/uninstall the mods, does the error go away? Was the php upgrade the only change done to the forum prior to the error happening?
Hi
@Doug Heffernan, no, the PHP Upgrade was the solution the host tried to solve the White Screen of Death problem. It worked in terms of getting the Home page back.
Quote from: @rjen on October 07, 2024, 10:34:05 AMCheck your server error log; it should give you exactly what error is happening.
Apart from that: specify your SMF version and the mods you are using....
SMF 2.0.19 with the following mods.
1. SMF 2.0.16 Update 1.0
2. Google Analytics Code 1.5.1
3. Tagging System 4.0
4. EU Cookie 1.3.1
5. Customize *Child Board* 2.7
6. Topic Rating Bar 1.4.2
7. Drafts
8. Board Sort Methods 2.0.1
9. Snow and Garland 1.4.1
10. Footer Menu 1.1.2
11. @mention members 1.1.2
12. SEO Sitemap 2.2.1
13. reCAPTCHA for SMF 2.0.0
14. Remove Help From Menu 1.0
15. Ohara YouTube Embed 1.2.11
16. Topic Viewers 1.0
17. SMF 2.0.18 Update 0.1.0
18. SMF 2.0.17 Update 1.0
19. Say Thanks
there are a number of 2.0.x mods which definitely do NOT support php 8.2
Quote from: Kindred on October 07, 2024, 11:12:18 AMthere are a number of 2.0.x mods which definitely do NOT support php 8.2
Thanks. I'll download the error log, and look at uninstalling mods too.
So I have downloaded the Error Log and the Fatal error that transpired last Thursday seems to be the following.
Quote[04-Oct-2024 21:11:43 UTC] PHP Fatal error: Uncaught TypeError: mysqli_errno(): Argument #1 ($mysql) must be of type mysqli, null given in /home/site/public_html/Sources/Subs-Db-mysql.php:1254
Stack trace:
#0 /home/Site/public_html/Sources/Subs-Db-mysql.php(1254): mysqli_errno(NULL)
#1 /home/Site/public_html/Sources/Errors.php(386): SMF_DB_MySQLi->show_error(NULL)
#2 /home/Site/public_html/Sources/Errors.php(72): show_db_error(false)
#3 /home/Site/public_html/Sources/Subs-Db-mysql.php(809): db_fatal_error()
#4 /home/Site/public_html/Sources/Subs-Db-mysql.php(36): SMF_DB_MySQLi->initiate('localhost', 'Site_smf707', 'Site_smf707', ''******[', 'smf7r_', Array)
#5 /home/site/public_html/Sources/Load.php(2672): smf_db_initiate('localhost', 'site_smf707', 'site_smf707', ''******[', 'smf7r_', Array)
#6 /home/site/public_html/index.php(72): loadDatabase()
#7 {main}
thrown in /home/site/public_html/Sources/Subs-Db-mysql.php on line 1254
[04-Oct-2024 21:11:43 UTC] PHP Fatal error: Uncaught TypeError: mysqli_errno(): Argument #1 ($mysql) must be of type mysqli, null given in /home/site/public_html/Sources/Subs-Db-mysql.php:1254
Stack trace:
#0 /home/site/public_html/Sources/Subs-Db-mysql.php(1254): mysqli_errno(NULL)
#1 /home/site/public_html/Sources/Errors.php(386): SMF_DB_MySQLi->show_error(NULL)
#2 /home/site/public_html/Sources/Errors.php(72): show_db_error(false)
#3 /home/site/public_html/Sources/Subs-Db-mysql.php(809): db_fatal_error()
#4 /home/site/public_html/Sources/Subs-Db-mysql.php(36): SMF_DB_MySQLi->initiate('localhost', 'site_smf707', 'site_smf707', ''******[', 'smf7r_', Array)
#5 /home/site/public_html/Sources/Load.php(2672): smf_db_initiate('localhost', 'site_smf707', 'site_smf707', ''******[', 'smf7r_', Array)
#6 /home/site/public_html/index.php(72): loadDatabase()
#7 {main}
thrown in /home/site/public_html/Sources/Subs-Db-mysql.php on line 1254
When I click on the blank board, I am seeing this error message.
Quote8192: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated
File: /home/site/public_html/Sources/Load.php
Line: 178
Edit-- Removed db password
Oh wait.
SMF 2.0.19 does not support php 8.2
You need to downgrade to php 8.0 or upgrade your SMF to 2.1.4
My host says it was at PHP 8.0 when the original White Page of Death happened on the Home Page.
Can you uninstall all third party mods one by one, and check if the error is fixed after each uninstallation? That is to either find the culprit or rule out the third party mods as being the cause of the error.
I did that and that did not solve the problem at all, unfortunately.
Changing PHP versions won't fix this: the issue is that PHP wasn't able for whatever reason to talk to MySQL. Since this is a process that starts every page, every time, it should work consistently everywhere or nowhere.
Which leads me to wonder how the forum homepage even works when the rest doesn't. Maybe your host is seeing something around too many connections to MySQL?
Quote from: Arantor on October 08, 2024, 04:52:07 AMChanging PHP versions won't fix this: the issue is that PHP wasn't able for whatever reason to talk to MySQL. Since this is a process that starts every page, every time, it should work consistently everywhere or nowhere.
Which leads me to wonder how the forum homepage even works when the rest doesn't. Maybe your host is seeing something around too many connections to MySQL?
There is only one sub-board on the site that shows the blank screen of death, which is crazy, given what you are saying.
Every other board is visible, and content is available.
Which implies something else is wrong, and that some other real error is the problem.
The preg callback call isn't it.
So I asked the Host Company if they are seeing too many connections to MSQL. The reply is below.
QuoteAlso, regarding your query about the MySQL process, I've monitored it for a while, and it seems that there are few connections occurring on the server.
For now I can see only two active processes running in MySQL, which is not excessive. These two processes are normal and do not represent any unusual load.
Thank you all for your suggestions.
The issue has been solved and relates to UTF-8 on my forum.
Thanks,
@lurkalot , for your help here. I appreciate it.
Quote from: John Connors on October 09, 2024, 07:36:09 AMThank you all for your suggestions.
The issue has been solved and relates to UTF-8 on my forum.
Thanks, @lurkalot , for your help here. I appreciate it.
Just for anyone else interested in the cause. It was this one again, https://www.simplemachines.org/community/index.php?topic=573899.msg4061800#msg4061800