Magento connect error solutions

Most often the problems are file permissions related. If you are already sure your magento is fully writable then perhaps you need to investigate your firewall. It is important that these problems be solved or you will likely encounter the same problem when installing other extensions from other providers.

File Permission

If the install gives a filesystem permission problem. Please talk to your admin and ask them to allow the php process to have full access to Magento. You can also do a quick unsafe fix to allow all access.

chmod -r 0777 ./<your_magento>

In some cases you may also need to change the file ownership security settings to allow the webserver application access in modifying the files. For instance you may need to change access permissions to allow the "apache" user to be able to read & write files.

ERROR: failed to mkdir

ERROR: failed to mkdir /<incorrect_magento_path>/app/design/adminhtml/default/default/layout/mageparts

If the file path is incorrect and you moved you Magento to a new domain or filesystem you will likely need to rebuild pear.ini

  1. Rename pear.ini to pear.ini.old so magento will auto rebuild it on next webpage access.
  2. rename>> ./your_magento/downloader/pearlib/pear.ini
  3. to>> ./your_magento/downloader/pearlib/pear.ini.old
  4. Try install again, Magento will auto rebuild the pear.ini
    • If magento does not rebuild pear.ini, then with ssh access you can do the following to manual rebuild the file:
    1. rename>> ./your_magento/downloader/pearlib/pear.ini
    2. to>> ./your_magento/downloader/pearlib/pear.ini.old
    3. ./pear mage-setup
    4. Set your new pear.ini to have execution rights (+x).

ERROR: failed to write ..... failed to open stream: Permission denied

ERROR: failed to write /.../www/app/design/adminhtml/default/default/layout/mageparts/.tmpcem.xml: copy(/.../www/app/design/adminhtml/default/default/layout/mageparts/.tmpcem.xml) [function.copy]:  failed to open stream: Permission denied
  • Check that your file permissions are set correctly
  • Check that "safe_mode" is not set in php.ini

If you have ssh access you can also try the following from the base Magento directory:

./pear install magento-community/MageParts_CEM      
downloading MageParts_CEM-1.0.3.tgz ...
Starting to download MageParts_CEM-1.0.3.tgz (159,575 bytes)
..................................done: 159,575 bytes
install ok: channel://connect.magentocommerce.com/community/MageParts_CEM-1.0.3<br>

PEAR ERROR: install failed

solution: change permissions and remove old cached files

If you see any "write protected" messages then all you will likly need to do is make Magento writable.

Use ssh to connect to your server, then run something similar to the below code (note: its insecure)

chmod -R 0777 ./[your_magento]
# or allow the web server php process running under ?(nobody:nogroup) access to your files
usermod -a -G nogroup [your_user]
usermod -a -G [your_group] nobody

If the above command did not help; try removing the downloader cached data:

# '''WARNING''': if rm is miss used it could destroy all your files.
rm -rf ./[your_magento]/downloader/pearlib/cache/*
rm -rf ./[your_magento]/downloader/pearlib/download/*

If you don't understand the above commands. Request your webhost to change file permissions to full read write for magento and to clear the cached data in the two above /downloader/pearlib/ directories.

INVALID POST DATA

solution: most offen a Firewall problem

Ask your host to check the listed servers are not blocked by accident:

connect.magentocommerce.com<br>wdca.ca

Also have them ping/traceroute to the servers to be sure no rare networking issues are between your host and the listed servers.

solution: rare, default PHP settings might be set low and need to be boosted

Most servers support the change in php limits within a ".htaccess" file. Locate the hidden file ".htaccess" from your Magento path and change or add these settings.

php_value memory_limit 256M
php_value max_execution_time 18000

If you don't understand the above command or dont have a ".htaccess" file, contact your webhost and request they increase the execution time and memory limits of PHP.

Force reinstall

See  Force MageRewards Reinstall

Unknown channels or connection to ‘proxy:3128’ failed

solution: configure pear

To fix the ‘unknown channels’ error, use SSH to go to the root magento directory and run the following commands:

./pear list-channels
If it can’t find the file, make sure that 
  a) it exists 
  b) it’s set to be executable for your user (not sure; make its permissions 777, insecure)
If the file exists and your user is allowed to run it, you should see a list of channels, eg:
doc.php.net 
pear.php.net 
pecl.php.net 
__uri
Should you not see anything about Magento there, re-configure pear using the following command:
./pear mage-setup
You should see output like the following:
Running initial setup… 
config-set succeeded 
config-set succeeded 
config-set succeeded 
config-set succeeded 
config-set succeeded 
config-set succeeded 
Adding Channel “connect.magentocommerce.com/core” succeeded 
Discovery of channel “connect.magentocommerce.com/core” succeeded 
Adding Channel “connect.magentocommerce.com/community” succeeded 
Discovery of channel “connect.magentocommerce.com/community” succeeded
If you run “./pear list-channels” again you should see a list like the following:
connect.magentocommerce.com/community 
connect.magentocommerce.com/core 
doc.php.net phpdocs 
pear.php.net 
pecl.php.net 
__uri
To fix the issue with connecting to ‘proxy:3128’, edit the file downloader/Maged/Pear.php and comment out the following line:
$config->set(’http_proxy’, ‘http://proxy:3128/’)<br>

The ‘http_proxy’ setting is used in the rare case where your site is behind a firewall, or when it needs to talk to an upstream proxy server or similar. In the majority of cases, this setting is not needed, however if you’re not sure ask your host or server administrator.

Manual Install

Please try all solutions before using manual install. If the normal install does not work, then there is a problem with your Magento setup. These problem(s) will likely cause more issues for other extensions latter on. It is best if you solve the root cause now so you don't wast time with this again in the future.

Still need help? Get Help Get Help