php.ini - "memory_limit = -1" ???

I'm just installing an Ubuntu 10.10 LAMP server. I'm following along with the installation doc for the Aegir Drupal Project (http://community.aegirproject.org/node/ … figuration">http://community.aegirproject.org/node/389#Apache_configuration). On the point to edit the /etc/php5/cli/php.ini memory limit up to 192M I was surprised to see the existing value for it as "-1". I have not installed a LAMP server since Ubuntu 8.10, but I don't ever recall seeing a value like that before…

I'm wondering if it is a method of stating 'no limit' or some such thing? Which I suppose would mean I could just leave it be rather than edit it to 192M. Can anyone shine some light on it?

Thanks

1 Reply

I'd change it to prevent your PHP scripts from running away with all your RAM.

-1 means no memory limit:

http://php.net/manual/en/ini.core.php

> This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to -1.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct