Windows IIS phpBB3 500 internal server errors

Just in case anyone else has a similar problem, I’ll post my experiences.

I’ve just upgraded the local biker forum that I look after, the upgrade was from an old version 2 phpbb to the current version (3.0.11).

The actual upgrade went fairly smoothly and everything seemed to be working fine so I renamed the old folder and changed the the new phpbb3 folder to phpbb2 (I know that’s kinda silly but I don’t want to break links).

Over the next 24 hours or so, I got a few 500 internal server errors with no idea what was causing the issue.  Googling gave me very little to go on, apart from a StackOverflow thread which reminded me how to get error logging working properly in PHP for windows.  So, I changed a couple things in php.ini (c:/php in my case); set “error_reporting  =  E_ALL”, I couldn’t seem to get “display_errors = On” to work correctly so left that to “Off” and instead went for “log_errors = On” and “error_log = c:/php/php_errors.log”.  One thing to point out here is, I’m pretty sure the ini file gets cached by php so make sure restart the website and recycle the app pool (I’m not sure if both are necessary, but worth doing anyway).

After changing the appropriate error bits (temporarily), I reproduced my error (simply trying to send a PM would throw it) and checked the log which showed –

[21-Nov-2012 20:24:06] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 1572864 bytes) in D:\….\includes\utf\data\confusables.php on line 1

Ah! A memory issue.  I headed back to php.ini and changed the default “memory_limit = 8M” to “memory_limit = 16M” (and restarted/recycled the site) and the random gremlins went away.

So, everything seems to be working well now.  Generally I’m pretty impressed with version 3 but have really struggled to get any kind of “spambot countermeasures” providing adequate protection.  All the various captcha options seem easily breakable by the bots (even though I can hardly read some of them myself).  In the end I’ve settled on the simple “Q & A” option which I guess is much harder to programmatically break.

Hope it helps!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: