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
10.0015510656{main}( )../index.php:0
20.0153523256funcMakeTableTotal2019( )../index.php:487
32.042933543952mssql_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 *