In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces how to solve php memory consumption, the content is very detailed, interested friends can refer to reference, hope to help everyone.
php eat memory solution: 1, change memory_limit from 8M to 16M;2, add "ini_set("memory_limit","100M");";3, modify the.htaccess document.
Operating environment: Windows 7 system, PHP7.4 version, DELL G3 computer
How does php eat memory?
Php page consumes too much memory processing method
This is because the maximum memory consumed by php pages is 8 MB by default (as can be seen in PHP ini files) , and errors occur when reading files that are too large or images that are too large.
Solution:
1, modify php.ini
Change memory_limit from 8 MB to 16 MB (or greater) and restart apache service
2. Add ini_set("memory_limit","100M") to PHP file;
Note: For normal use of other system resources, please do not set memory_limit too large, where-1 is unlimited.
3. Modify the.htaccess file (provided that the directory supports.htaccess)
Add a sentence to the document: php_value memory_limit 16M(or greater)
About php memory consumption how to solve the problem to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.