How can I change PHP memory limit in cPanel?
Steps to change memory limit for PHP in cPanel:
- Log in to your cPanel account.
- Click on Select PHP Version from the Software section.
- Click on Options tab at the top of the page.
- Find memory_limit option and click on the dropdown icon.
- Select the desired memory limit from the list.
How can I check PHP memory limit in cPanel?
More videos on YouTube
- 1) Log into cPanel.
- 2) Look for the SOFTWARE section and click on Select PHP version.
- 3) In the new window click on the Switch To PHP Options button.
- 4) Here you can locate the memory_limit and click on the value.
- 5) Once you’ll do the change, the new value will be automatically updated.
How to solve PHP fatal error : allowed memory size of?
But it has the same workaround as “Fatal error: Allowed memory size of 8388608 bytes exhausted…” or “Fatal error: Allowed memory size of 16777216 bytes exhausted…” or whatever. Apparently, the memory_limit default was upped from 8M to 16M in PHP 5.2.0 and is now 128M for PHP 5.3.0, which would explain why you may not get this error message at all.
Why is my PHP server using so much memory?
Your PHP code may have a memory leak somewhere and you are telling the server to just use all the memory that it wants. You wouldn’t have fixed the problem at all. If you monitor your server, you will see that it is now probably using up most of the RAM and even swapping to disk.
What’s the default MEMORY SIZE in PHP 5.3?
Apparently, the memory_limit default was upped from 8M to 16M in PHP 5.2.0 and is now 128M for PHP 5.3.0, which would explain why you may not get this error message at all. You can also disable the memory limit by setting memory_limit to –1 in PHP.ini. This isn’t usually a good idea, though, for obvious reasons.
How can I find out how much memory my PHP script is using?
One way to figure out how much memory your PHP script is using is to use the memory_get_usage () PHP function. Simply echo it at any point in your script to find out where your memory usage is spiking: If you’re getting this error message in Drupal or Joomla, the likely culprit is a new module or package.