My script needs a higher memory allocation, how do I increase it?

You can create your own php.ini file inside whatever sub-directory your script is in.

memory_limit = 32M;

and then make or amend a .htaccess file as well

RLimitMEM 256000000

This will increase the memory limit for a php script to 32MB

If this still does not work, take note of the error message that is produced. Is PHP now reporting that it is running out of memory at 32MB, or is it still reporting the old amount? In the former case, try upping the memory again. If you keep getting memory errors at each level, it is quite likely that an infinite loop has been created within your script, and it will run out of memory, no matter how much you use. In the latter case, it is likely that thePHP memory limit is being set elsewhere, either within your code, or via another php.ini.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Moodle gives a white page and reports memory issues.

Set the following in your php.ini put this in the root of your Moodle installation - this is...

Why isn't my custom php.ini working?

There are a few common reasons why custom php.ini files won't work.   Check the file...

Why is my scheduled task (CRON job) not running?

If the scheduled task did not run check the following before contacting support. 1) The file...

'Pretty' URLs not working in Concrete5

This problem with the Concrete5 script is related to the configuration of PHP on our systems, but...

How do I install Locked Area Lite?

Before you install Locked Area Lite you need to create a folder that you want to protect - this...