Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Increase PHP memory limit

Answer:

If you experienced error such as "Fatal error: Allowed memory size of 16777216 bytes exhausted ", you would need to increase the memory limit of your PHP, by editing the php.ini

vi /etc/php.ini

Locate and set

memory_limit = 32M ;

Try it with the number you need.

  1. Display the current hard limit of my Linux server
  2. Change the PHP’s maximum upload file size
  3. Check the amount of memory used by PHP
  4. Change the PHP’s maximum allowed form post size
  5. Increase the maximum number of open files / file descriptors

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>