I recently installed Ubuntu 12.10 server with the stock version of Apache2, PHP and MySQL. Something is wrong with PHP - first I thought it was an issue with PHP Markdown, as the script came to a screeching halt (after being locked for a few seconds) on line 1420 with the error
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in /.../vendor/Markdown.php on line 1420
After a while I gave up debugging PHP Markdown, decided to temporarily disable it and move on with my project. Then I got the error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /mnt/hgfs/Dropbox/Projects/twork/lib/database.php on line 78
This is line 78 of database.php:
$results = $stm->fetchAll(PDO::FETCH_ASSOC);
And as my entire database only contains about 20 rows at the moment, I think you'll agree that this error is utter bullshit. I recently ran this project on PHP 5.3 on a different system without problems. Something about my current PHP setup is causing loops to continue for ever and running out of memory.
IMPORTANT NOTE: Both PHP Markdown and PDO (MySQL) works perfectly in the CLI version of PHP on this very same system - the problem is only with Apache2 + PHP.
Are there any settings, bugs or quirks you know about that can cause this behaviour in PHP?
Here is my