Increase PHP Memory

Fatal error: Allowed memory size of xxxxxxxxx bytes exhausted (tried to allocate xxxxxxxx bytes).

 

First check your control panel for the "MultiPHP INI Editor" icon. Upload limits may be changed in this area.

If the icon is not available in your control panel you will need to create a php.ini file in the directory that is used by the application and include the following value...

memory_limit = 128M

 

You can also try increasing this limit in your public_html/.htaccess file with the following code...

php_value memory_limit 128M

Change 128M to 256M, 512M or higher if necessary. 

If you cannot find an .htaccess file when using "File Manager" be sure that you are in the public_html folder or the exact subfolder where your script is running...

Then be sure "Show hidden files (dotfiles)" is enabled in "Settings".

If the file still doesn't show you may create a blank file named .htaccess and add the code.

Note: This increases the processor and memory load of your account on the server. A higher number will cause your php load to go up and may flag your account so be careful with this setting.

  • 136 Users Found This Useful

Was this answer helpful?

Related Articles

The MySQL server is currently offline admin bin Cpanel/cpmysql/DBCACHE: exit 11

The error message...  The MySQL server is currently offline admin bin Cpanel/cpmysql/DBCACHE:...

What port is MariaDB - MySQL on?

MariaDB and MySQL, two popular open-source relational database management systems (RDBMS), use...

Clean - Shrink ibdata1

To shrink ibdata1 once and for all you must do the following:MySQLDump all databases into a SQL...

How can I parse html as php?

Create an .htaccess file and upload it to the root of your public_html directory. Include the...

Running a PHP file with a cron job

To run a PHP file from cron, use the "cron jobs" section of your control panel. Use the following...



Save 30% on web hosting - Use coupon code Hosting30