Allowed memory size of aaaaa bytes exhausted tried to allocate bbbbb bytes

Source: Internet
Author: User
PHP is using MySQL to report this error.

AAAAAA byte size of memory exhaustion (when attempting to allocate bbbbb bytes)

If the value of BBBBB is larger than the AAAAA, it means that the memory is small, not enough, this time we need to modify the settings, the setting to write a bit larger:

The solution is now recorded in the following ways:

First, modify the php.ini (recommended):

Search the Memory_limit field in PHP.ini, and make changes, such as

Memory_limit = 128M

Second, add the following statement inside the program
In the. PHP code, add the following configuration statement:

Ini_set ("Memory_limit", "128M");

In fact, there is a situation where the value of BBBBB is much smaller than the value of AAAAA:

This time is not a memory problem, is the problem of the program, may not be in your program to open MySQL-related content, attention to multi-check and database connection associated with the authenticity of the code

The above describes the allowed memory size of aaaaa bytes exhausted tried to allocate bbbbb, including aspects of the content, I hope to be interested in PHP tutorial friends helpful.

  • 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.