How to deal with excessive memory consumption on the php page _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
Php page memory consumption is too large. Solution: 1. modify php. ini changed memory_limit from 8 M to 16 M (or larger), restarted apache Service 2, and added ini_set ("memory_limit", "M") to the PHP file. note: The solution is as follows:

1. modify php. ini.
Change memory_limit from 8 M to 16 M (or larger) and restart the apache service.

2. add ini_set ("memory_limit", "100M") to the PHP file ");

Note: do not set memory_limit too large to ensure the normal use of other system resources.-1 is not limited.

3. modify the. htaccess document (provided that the directory supports. htaccess)
Add a new sentence in the document: php_value memory_limit 16 M (or larger)

Modify php. ini changes memory_limit from 8 M to 16 M (or larger), restarts apache Service 2, and adds ini_set ("memory_limit", "M") to the PHP file. note: is...

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.