Fatal error: Allowed memory
I am running version 3.15.
When I try to view 25 or 50 errors per page at /cmsb/admin.php?menu=_error_log
I receive an error message:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4355432 bytes) in /public/cmsb/lib/viewer_functions.php on line 442
I realise I could maybe increase the memory allowance in php.ini to prevent this but I'd like to know why so much memory is being used in the first place.
Could someone please give me some clues?
I can't be sure without taking a closer look, but I suspect I know the cause of the issue.
When an error is logged in the CMS, it also stores any data that was set in PHP variables when the error happened in the Symbols table field. This is great for debugging the cause of an issue, but also means that the error log records can be very large if you're loading a lot of records, reading the contents of a file, etc, on a particular page that has an error on it. I suspect the issue is that when you display 25 or more records in the error log at once, the system uses over 128MB of memory (this is the memory limit set in the file /lib/init.php) as the error log records are large.
Would it be possible to send an email to firstname.lastname@example.org with the CMS/FTP login details for the site so I can take a closer look at the issue?
PHP Programmer - interactivetools.com