PHP 5.2, Memory Usage and Moodle

PHP 5.2, Memory Usage and Moodle

by Bryce Thornton -
Number of replies: 1
We have upgraded PHP to version 5.2 for our 1.6.3 Moodle installation. One thing that has changed in this version of PHP is the way it keeps track of memory usage. The release notes read:

"New memory manager for the Zend Engine with improved performance and a more accurate memory usage tracking."

It's supposed to be much more accurate, thus making it all the more important for developers to keep a close eye on their scripts. We have had some weird issues lately with certain Moodle blocks (calendar in particular) failing to show up on various pages and we think it might have something to do with memory usage. A key trait of memory usage errors is the complete stoppage of execution. There are no error messages of any kind. The page just stops loading.

We have our PHP memory_limit set to 32MB, but I don't think that really applies to Moodle as there are a BUNCH of calls to "ini_set('memory_limit')" throughout the code. Has anyone else noticed this with PHP 5.2? If so, do you agree that the new memory manager might be the culprit?
Average of ratings: -
In reply to Bryce Thornton

Re: PHP 5.2, Memory Usage and Moodle

by Bryce Thornton -
UPDATE

The memory limit was hit because of some code we had added, not core Moodle code. Sorry for the confusion.