PHP Fatal Error: Out Of Memory
PHP Fatal error: Out of memory (allocated 45236595) (tried to allocate 74521 bytes) in /home/xxxxx/public_html/xyz/admin.php(154) on line 40
Solution is to increase the memory allocated for PHP.
1. Try looking for the php.ini file. You might find some redundant php.ini files, so make sure you have got the one which is actually being read by PHP. o be sure, create a new php file in your root folder, say “check.php” and have phpInfo(); within the php open and close tags. Execute this file to get the information on where the php.ini is residing. Normally it will be in /usr/local/lib/php.ini
Open the php.ini file in a text editor and change the values for memory_limit. By default you should see memory_limit = 8M. Try changing it to 12M. If it doesn’t work, increase it to 16M or even 24M and so on.
2. In case you can’t find the php.ini file or do not have access to it, then open up the file which was throwing the error (admin.php in my case) and add a line below just after
3. You can even consider adding a line in .htaccess file which will resolve the issue.
php_value memory_limit 32M
4. Or else, Try adding this line to your wp-config.php file:
Increasing memory allocated to PHP