昨天在安裝 WordPress 2.5 時出現了以下的錯誤訊息,Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 19604 bytes) in /public_html/******/template.php on line 376。錯誤訊息的意思是php的memory limit太小了,而我在網路上找到了三種解決方法。
1. 修改 php.ini 中的 memory_limit=8M 這個數值,改為12M或更大一些。
(我沒有權限,所以沒有試這個方法)
2. 將ini_set("memory_limit","12M");加入出現錯誤訊息的php檔案
(我試了,但是一樣出現錯誤訊息)
3. 在 .htaccess 檔案中加上 php_value memory_limit 12M
(我就是用這個方法解決問題的)