How to fix the fatal error allowed memory size exhausted [SOLVED] (PHP)

How to fix the following memory size error on turnkeylinux (or similar)?

( ! ) Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 80 bytes) in /var/www/fit2019/index.php on line 2841
Call Stack
# Time Memory Function Location
1 0.0015 510656 {main}( ) ../index.php:0
2 0.0153 523256 funcMakeTableTotal2019( ) ../index.php:487
3 2.0429 33543952 mssql_fetch_assoc ( ) ../index.php:2841

Answer:Edit the configuration file:


and set the memory limit to a value higher than 32M:

memory_limit = 128M

Then restart Apache! You should be all set 🙂

NOTE: here is a screenshot showing the relevant section of php.ini

Change the 32M value to something higher


Leave a Reply

Your email address will not be published. Required fields are marked *