Php memory is insufficient. When you run the php program again, Allowedmemorysizeof8388608bytesexhausted (triedtoallocate1298358bytes) occurs. cause: make sure it is not the cause of the program (for example, when you run the php program again
Allowed memory size of 8388608 bytes exhausted (tried to allocate 1298358 bytes)
Cause of the error: make sure it is not the cause of the program (such as an endless loop ), because the maximum memory consumed by php pages is 8 MB by default (as can be seen in the ini file of PHP ),
If the file is too large or the image is too large, the above error occurs during reading.
Solution:
1. modify php. ini to change memory_limit from 8 M to 16 M (or larger), and restart the apache service.
2. add ini_set ('memory _ limit ',' ** m') to the PHP file. note: Do not set memory_limit too large for normal use of other system resources, -1 is not limited
3. modify the. htaccess document (provided that the directory supports. htaccess). in this document, add the following sentence: php_value memory_limit 16 M (or larger)
Cause of the error caused by Allowed memory size of 8388608 bytes exhausted (tried to allocate 1298358 bytes): make sure it is not the cause of the program (for example...