PHP error allowed memory size of 67108864 bytes exhausted 3 Solutions _php instance

Source: Internet
Author: User
Tags php error
Today in Baidu know to see PHP related information found a netizen asked a WordPress installation prompt error of a problem, said he installed the WordPress installation package encountered such a problem: Fatal error:allowed memory size of 67108864 bytes exhausted (tried to allocate-bytes) in ... this problem has not been encountered before, according to the hint must be caused by memory overflow. Why do you have such a hint? Below I put oneself tidy of cause of error and solution to Phper share, hope to be helpful.

Cause of Error:

Because the PHP page consumes the maximum memory default is 8M (can be seen in the PHP php.ini configuration file), if the file is too large or the picture is too large, the above prompt error occurs when reading.

Solutions, there are three solutions that individuals currently know:

The first solution is to include Ini_set ("Memory_limit", "80M") in the PHP file, of course, 80M can be changed according to their own circumstances, not too big oh, otherwise the system other resources will encounter problems oh, of which-1 is not set limits.

The second solution is to modify the php.ini configuration file, which is found in the php.ini
Copy the Code code as follows:; Maximum amount of memory a script may consume (128MB)
; Http://php.net/memory-limit

Memory_limit = 16M, remove the previous semicolon, change the value of the size of the memory_limit from 8M to 16M (or larger), restart the Apache service.

The third solution is to modify the. htaccess Distributed configuration file (Note: If the directory supports. htaccess). Add a new sentence to the document: Php_value Memory_limit 16M (or larger)

  • Related Article

    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.