Home > Backend Development > PHP Tutorial > Fatal error Allowed memory size_PHP Tutorial

Fatal error Allowed memory size_PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:26:56
Original
932 people have browsed it

There are many solutions. Below I will introduce them according to the webmasters with different permissions

Have server management rights to modify the php.ini file

You can directly increase memory_limit = 8M in php.ini; to 12M or more. (Note: M is followed by M, not MB)

No server management rights

1. Directly modify the memory in php, but your php needs to support the ini_set function. If this function is prohibited from being used in php.ini, then this method will be invalid.

ini_set('memory_limit','12M');//Of course it can be set to a larger value


2.htaccess method, this kind of general space host supports

Create a .htaccess file in the root directory and add the following content:

php_value memory_limit 20000000

Note: Generally speaking, 8M is the standard, but sometimes 8M is not enough.

Friendly reminder: Fatal error: Allowed memory size of 8388608 bytes exhausted. Indicates that the configured memory_limit value is 8M. The solution is also solved by the method introduced above. The memory_limit value needs to be debugged little by little

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/822510.htmlTechArticleThere are many solutions. Below I will introduce how to modify php with server management permissions based on webmasters with different permissions. ini file can be set directly in php.ini to memory_limit = 8M; increase it to 12M or...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template