PHP Run Web site low memory hint Fatal error allowed memory size_php Tutorial

Source: Internet
Author: User
There are a variety of solutions, below I according to different permissions of the webmaster to introduce

You can modify the php.ini file with server administration permissions

Can be directly in the php.ini memory_limit = 8M; Size up to 12M or greater. (Note: M is not MB later)

No Server administrative rights

1.php directly modify the memory but need your PHP support Ini_set function, this function if the php.ini is forbidden to use then this method will be invalid.

Ini_set (' Memory_limit ', ' 12M ');//Can of course be set to a larger value


2.htaccess Way, this general space host is supported by

In the root directory, create the. htaccess file and add the following:

Php_value Memory_limit 20000000

Note: In general, 8M is standard, but sometimes 8M is not enough.

Friendly tip: Fatal error:allowed memory size of 8388608 bytes exhausted. Indicates that the configured Memory_limit value is 8M. The solution is also solved using the method described above. Memory_limit value to 1.1 points and debugging success can

http://www.bkjia.com/PHPjc/822510.html www.bkjia.com true http://www.bkjia.com/PHPjc/822510.html techarticle There are many solutions, the following I according to different permissions of the webmaster to introduce server management permissions can be modified php.ini file can be directly in the php.ini Memory_limit = 8M, up to 12M or ...

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