Fatal Error: Allowed memory size of 123456789 bytes exhausted

Source: Internet
Author: User
Tags php code phpinfo

Error message

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 3214636 bytes) in E: VertrigoServwwwinstall. php on line 488

Create a phpinfo. Php file and write the following code:

<? Php phpinfo ();?>

Then you can view your memory.

Insufficient php memory allocation:

1. Modify php. ini (recommended)

The code is as follows: Copy code
Memory_limit = 12 M (larger)


2. Add the following statement to the program:

Modify php memory settings during runtime

Add the following command line to your php code.

The code is as follows: Copy code

<? Php

Ini_set ('memory _ limit ', '128m ');

?>

3. Create a. htaccess file in the root directory and add the following content:

The code is as follows: Copy code

Php_value max_execution_time 1200
Php_value memory_limit 200 M
PHP value post_max_size 200 M
Php_value upload_max_filesize 200 M

What should memory_limit be set?

This is totally dependent on your application requirements. For example, Wordpress requires 32 MB to run the core code. Drupal 6 requires a minimum value of 16 MB and is recommended to be set to 32 MB. If you install many plug-ins, especially those that require image processing, you may need MB or higher memory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.