WordPress: Upload Plugin stuck at “Unpacking the package…”, Getting Memory Size Limit Error

て烟熏妆下的殇ゞ 提交于 2019-12-11 05:23:48

问题


I just did a fresh install of WordPress 3.2.1. I've uploaded and activated one plugin with no problem - Contact Form 7. I'm attempting to install Really Simple Captcha, since it goes along with Contact Form 7.

But, when I go to install it (either upload from my computer or install from WP, doesn't make a difference), it gets stuck at "Unpacking the package...". I check my server error logs, and they have the following:

PHP Fatal error:  Allowed memory size of 16777216 bytes exhausted (tried to allocate 311296 bytes) in <mysite>/wp-includes/class-simplepie.php on line 4186, referer: <mysite>/wp-admin/index.php

I've searched this error, and they recommend changing the memory limit to 64m or 128. I tried this, but I still get the same "Allowed memory size of 16777216 bytes" error - even though I've changed the memory limit, it still shows the same number.

I've added define('WP_MEMORY_LIMIT', '128M'); to /wp-config.php and to /wp-includes/default-constants.php . I've also added ini_set("memory_limit","64MB"); to /wp-config.php .

I tried another solution of adding AddType x-mapp-php5 .php to .htaccess, but that wouldn't load my site - gave me error [warn] Cannot get media type from 'x-mapp-php5'

What the heck am I doing wrong?


回答1:


You need to change the memory_limit in the php.ini for your server. Changing it at runtime has typically no effect (on shared hosting anyway), much less the WP_MEMORY_LIMIT constant.

If safe_mode and other restrictions are not enabled, then php_value via .htaccess or in a .user.ini for CGI setups might work.




回答2:


For me the problem solved with disabling "JCH OPTIMIZE" Plugin



来源:https://stackoverflow.com/questions/8439375/wordpress-upload-plugin-stuck-at-unpacking-the-package-getting-memory-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!