Q:

Magento not rebuilding product image cache

After clearing Magento's image cache, the site seems unable to rebuild image caches and certain pages are loading with a url extension ?___SID=U. All product images are coming up blank and look to be halting further loading of the site (no footer or sidebar loading on those pages).
It seems to be a permissions issue? Relevant folder (media) is currently recursively set to 777. But I'm still having issues.
Also renamed the htaccess in media to htaccess-old
No luck. Can't upload new images either. And no the server isn't out of storage.

A:

Make sure PHP "GD" graphics module is installed. Magento uses it to create the thumbnails. Type in your shell:
php5 -m | grep gd

This should output a gd all by itself on a single line. If it does not, then you need to install the gd module. 
Therefore, to install gd, type the following commands in the shell (tested on Ubuntu 12, but may vary depending on your OS):
sudo apt-get install php5-gd

Next, restart Apache. How to do that may be particular to your installation, so make sure that you know the right way to do it. 
Ubuntu 12:
sudo service apache2 graceful

OS X:
sudo apachectl graceful

If you don't need a "graceful" restart (preserves existing connections) then simply use the word "restart" instead of the word "graceful" in the above commands.
There are more comprehensive instructions at this link.

A:

media folder permission 777
deleted htaccess file under the media folder
clear the cache
cache folder is writeable
rebuilt all indexes

try also:
cd /var/www/html/var
rm -rf cache/* full_page_cache/*

