Today in Baidu know to see PHP related information found a netizen asked a WordPress installation prompt error of a problem, said he installed the WordPress installation package encountered such a problem: Fatal error:allowed memory size of 67108864 bytes exhausted (tried to allocate-bytes) in ... this problem has not been encountered before, according to the hint must be caused by memory overflow. Why do you have such a hint? Below I put oneself tidy of cause of error and solution to Phper share, hope to be helpful.
Cause of Error:
Because the PHP page consumes the maximum memory default is 8M (can be seen in the PHP php.ini configuration file), if the file is too large or the picture is too large, the above prompt error occurs when reading.
Solutions, there are three solutions that individuals currently know:
The first solution is to include Ini_set ("Memory_limit", "80M") in the PHP file, of course, 80M can be changed according to their own circumstances, not too big oh, otherwise the system other resources will encounter problems oh, of which-1 is not set limits.
The second solution is to modify the php.ini configuration file, which is found in the php.ini
Copy the Code code as follows:; Maximum amount of memory a script may consume (128MB)
; Http://php.net/memory-limit
Memory_limit = 16M, remove the previous semicolon, change the value of the size of the memory_limit from 8M to 16M (or larger), restart the Apache service.
The third solution is to modify the. htaccess Distributed configuration file (Note: If the directory supports. htaccess). Add a new sentence to the document: Php_value Memory_limit 16M (or larger)