Knowledgebase
Portal Home > Knowledgebase > 5. Dedicated Servers > Specially Linux Tips > Solve PHP Fatal error: Allowed memory size of 8388608 bytes exhausted
Solve PHP Fatal error: Allowed memory size of 8388608 bytes exhausted
| This error message can spring up in a previously functional PHP script when the memory requirements exceed the default 8MB limit. This will server wide increase memory limit to 12MB. - nano php.ini
- change "memory_limit" from 8M to 12M
- Restart apache
This will change the memory use for 1 script to 12MB - To change the memory limit for one specific script by including a line such as this at the top of the script:
ini_set("memory_limit","12M");
The 12M sets the limit to 12 megabytes (12582912 bytes). If this doesn't work, keep increasing the memory limit until your script fits or your server squeals for mercy.
|
Add to Favourites
Print this Article
|
Also Read
Cron Command (Views: 604)
Powered by WHMCompleteSolution