Every time, I install an extension through Magento Connect Manager I get the following error:

Exception during cache and session cleaning

I tried running Magento Cleanup file and then try again.

also tried downloader/lib/Mage/Archive/Helper/File/Gz.php in your Magento directory and replace

$this->_fileHandler = @gzopen64($this->_filePath, $mode);

Still having issue; my Php Version is 5.5 if that helps and my host is Site Ground. I am lost why I am getting this error. Nothing in the logs either.


Here is a screenshot of this error; I tried other extensions same thing

enter image description here

  • It was fine in version 1.8.1; is it a bug in Jan 11, 2017 at 9:11

2 Answers 2



All you have to do is go to downloader/Maged/Connect.php, find

var response = transport.responseJSON || transport.responseText.JSONeval(true) || {};

replace it with:

var response = transport.responseJSON || JSON.parse(transport.responseText) || {};

You can rename var folder on root of magento directory, as Magento is saving its cache & session information there for case of if you've set file based. You could use C-Panel & shell both for this.

for shell access, mostly web applications reside in




cd /var/www/html/magento

sudo mv var var11jan17

  • What will renaming var folder do? Jan 11, 2017 at 16:18
  • Magento, in this folder are the cache and session folder. In other words we are deleting the cache and session. Jan 11, 2017 at 18:31
  • I deleted cache and sessions. I am thinking it has to do with permissions. Magento Connect tries to delete this after you install; remove; reinstall correct? Is this why I am getting this error Exception during cache and session cleaning? Permissions on Var folder is set to 755 since I have SuExec and I cant go with 777 could this be the issue Jan 11, 2017 at 19:16
  • yeah var, media should be 777 Jan 11, 2017 at 19:42
  • You need to find out all correct permission mentioned in magento1 site and also get the last release for magento1 which is it does contains all the security patches and surprise for magento1 Jan 11, 2017 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.