PHP allocates a certain amount of memory when executing PHP scripts. When the allocated memory is exhausted, the PHP script shows a fatal error:
PHP Fatal error: Allowed memory size of xxx bytes exhausted (tried to allocate yyy) in yourscript.php
Please note that the memory_limit value should be set to at least as big as post_max_size.
Follow these steps to increase memory_limit in cPanel
- Log into your cPanel from within your Zalvis client account
- Locate and Select the PHP version menu in the Software section
- Click the Options section for the php.ini values and scroll down to memory_limit
- Set the value to what you want. Once you have done the change make sure that you do a left-click anywhere outside the text input or drop-down box.
- You will see a green box with a message that will confirm that the change you’ve made has been applied.
You can confirm whether your changes have got into effect by creating a PHP info.php file. To create an info.php file, Follow the steps in this guide.
If you enjoyed this article, then you’ll love Zalvis's Cloud Hosting platform. Turbocharge your website and get 24/7 support from our veteran team. Our world-class hosting infrastructure focuses on auto-scaling, performance, and security. Let us show you the Zalvis difference! Check out our services.