Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: arcadecontrols on January 12, 2014, 11:59:18 AM

Title: Blank page when posting/replying - fixed! Details to help others
Post by: arcadecontrols on January 12, 2014, 11:59:18 AM
I started having the white screen of death yesterday when posting/replying intermittently. Most browsers would show a blank page, IE showed a 500 server error. The problem was not consistent. SMF gurus, any input on why it was inconsistent would be awesome to help me understand the inner workings. :)

I did look through carefully but the info there did not seem to help/apply to me, though the READ YOUR ERROR LOGS message was the best advice. :)

I'm running SMF 2.03 under Lighttpd.

The short answer is I modified /Themes/default/languages/EmailTemplates.english.php a while back, did so poorly, and that caused my problem. Restoring the original from backup solved it. However, the clues and timing were not so straight forward, so I'm posing my troubleshooting trail below in case it's helpful to others. Note especially that I modified the file weeks ago, and the problem only cropped up yesterday!

A few weeks ago, I modified /Themes/default/languages/EmailTemplates.english.php -- I wanted to give a customized message to people whom I sent a reject notice to. After modifying the file, I restarted lighttpd, and tested. The customized message didn't work, but there were no forum errors/problems either. I backburnered it until I could spend more time looking at it.

Yesterday, I modified my /etc/php5/cgi/php.ini file to up the default post_max_size=8M memory size limit to 64M to troubleshoot a different issue. Restarted lighttpd. Immediately after that, I started getting the blank pages when replying/posting. Topics *were* posting/updating, but the display was blank after hitting submit/post. I undid my php.ini change, restarted lighttpd again, but the problem remained, and remained through all my troubleshooting attempts. Boggling.

I attempted to look for the php error log, but there was no error.log in my forum directory. This is because errors were being logged to the /var/log/lighttpd/error.log file. I had looked there earlier, but had dismissed it in error because while I saw errors pertaining to the EmailTemplates.english.php, I didn't think they were related since I had *JUST* changed a memory parameter and all indicators were some kind of memory problem displaying the page after post. I thought there should be a separate php error log file somewhere after reading some of the suggestions elsewhere in this forum, but that was not the case (for my setup at least).

Anyway, of course resolving that resolved my problem. Hope that's of some use to anyone facing similar issues.

Questions for gurus:

1. Why would the problem with my syntax error with the EmailTemplates.english.php file not crop up for a couple of weeks? I did restart my web server (service lighttpd restart) after making the change to the file, but no problems with blank pages even though I'd introduced a syntax error at that time. Is something cached somewhere that would survive a web server restart?

2. Is the /Themes/default/languages/EmailTemplates.english.php used by all themes? One of my troubleshooting steps was to change themes to see if it was unique to a theme, but no such luck.

3. Why would something like this be intermittent? Some users never saw the problem, some did, and some saw it sporadically. Is there some user setting that determines if /Themes/default/languages/EmailTemplates.english.php is read or not?


--- John
Title: Re: Blank page when posting/replying - fixed! Details to help others
Post by: Arantor on January 12, 2014, 12:06:40 PM
It is used by all themes unless they provide their own (unlikely)

It is only loaded when needed, and it wasn't loaded for you because nothing you did triggered emails to be sent.

If someone has turned on notifications to a thread, that means emails will be sent out at the point of posting, which does mean the white screen on death would appear at that point.