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

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?

Answers

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.

Posted on by mario