PHP Run Tip: Fatal error allowed memory size solution, fatalallowed
The example in this article tells the PHP run prompt: Fatal error allowed memory size is not enough to resolve. Share to everyone for your reference. Here's how:
Some friends new configuration of the environment or their own newly written program run will encounter fatal error:allowed memory size of 134217728 bytes exhausted error, this problem is not written by the program caused, Another is the environment configuration is not good also will appear, like php5.1.27+apache2.2.3 appears in the windows2003 will appear bug no matter how you fix can not solve fatal error allowed memory size This problem, Only the new environment and PHP version can be configured on reboot.
There are many solutions, the following we will be based on different permissions of the webmaster to introduce.
One, for the server administrative rights can modify the php.ini file
Can be directly in the php.ini copy code code as follows: Memory_limit = 8M; increase to 12M or greater. (Note: M is not MB later)
Second, for 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.
Copy the Code code as follows: Ini_set (' memory_limit ', ' 12M ');//Can of course be set to a larger value
2.htaccess mode, this general space host is supported, in the root directory to establish the. htaccess file, add the following:
Copy the Code code as follows:
Php_value Memory_limit 20000000
Note: In general, 8M is standard, but sometimes 8M is not enough.
Special reminder: Fatal error:allowed memory size of 8388608 bytes exhausted, which means that the Memory_limit value of the configuration is 8M, the workaround is to use the method described above to solve, memory_ Limit value to 1.1 points plus debugging success.
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/929092.html www.bkjia.com true http://www.bkjia.com/PHPjc/929092.html techarticle php Run Tip: Fatal error allowed memory size of the solution, fatalallowed This example tells the PHP run prompt: Fatal error allowed memory size of the solution ...