Today in Baidu know to see PHP related data found a netizen asked a WordPress installation hint error 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 .... The small part of this problem has not been encountered before, according to the prompts must be caused by memory overflow. And why is there such a hint? Below I put myself to organize the error reason and solution to phper share, hope to help.
Reason for error:
Because the maximum memory consumed by the PHP page is 8M (as you can see in the PHP php.ini configuration file), if the file is too large or the picture is too large, the error will occur when reading the message.
Solution, the individual currently knows three solutions:
The First solution is: add ini_set in PHP file ("Memory_limit", "80M"), of course 80M can be changed according to their own circumstances, and not too much, 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 and find it in php.ini
Copy Code code as follows:
; Maximum amount of memory a script may consume (128MB)
; Http://php.net/memory-limit
Memory_limit = 16M, remove the preceding semicolon, change the value of the size of the memory_limit from 8M to 16M (or greater), restart the Apache service can.
The third solution is to modify the. htaccess Distributed configuration file (Note: The premise is that the directory supports. htaccess). Add a new sentence to the document: Php_value memory_limit 16M (or greater)