Portal Home > Knowledgebase > Magento > Magento CONNECT ERROR: Canąt write to file: downloader/.cache/community/
Magento Connect in Magento 1.5 sometimes throws the following error message on attempt to install some extensions (we have noticed this on minerva_shipping-1.3.2):
You have checked all permissions and are sure that the destination is writeable, yet the Magento Connect cannot create this file.
The reason is that function working with archives passing non-ASCII characters in the filename and the filename cannot be created simply due to filesystem restrictions on filenames.
The simple fix can be just patch the _writeFile function in downloader/lib/Mage/Archive/Abstract.php to strip all non-ASCII characters from the filename:
--- Abstract.php +++ downloader/lib/Mage/Archive/Abstract.php @@ -43,4 +43,5 @@ protected function _writeFile($destination, $data) { + $destination = preg_replace('/[^(\x20-\x7F)]*/','', $destination); if(false === file_put_contents($destination, $data)) { throw new Mage_Exception("Can't write to file: " . $destination);
Add to Favourites
Print this Article