Sometimes when we run the PHP program again, it appears
Allowed memory size of 8388608 bytes exhausted (tried to allocate 1298358 bytes)
The reason for this error: In order to ensure that it is not the cause of the program (such as a dead loop), is due to PHP page consumption of the maximum memory default is 8M (can be seen in the PHP INI),
This error occurs if the file is too large or the picture is too large to read.
Workaround:
1. Modify the php.ini to change the memory_limit from 8M to 16M (or larger) and restart the Apache service
2. Add Ini_set (' Memory_limit ', ' **m ') to the PHP file; Note: For the normal use of other resources of the system please do not set the memory_limit too large, where 1 is unlimited
3. Modify the. htaccess document (provided that the directory supports. htaccess) Add a new sentence to the document: Php_value Memory_limit 16M (or larger)
http://www.bkjia.com/PHPjc/824931.html www.bkjia.com true http://www.bkjia.com/PHPjc/824931.html techarticle Sometimes when we run the PHP program again, the allowed memory size of 8388608 bytes exhausted (tried to allocate 1298358 bytes) occurs because of this error: in ensuring that the program is not producing ...