Hi!
I have a problem installing extensions.
When I try to install it using the install key I get the error: "couldn't connect to host"
When I try to upload the package manually, the following error appears:
"CONNECT ERROR: The 'community' channel is not installed. Please use the MAGE shell script to install the 'community' channel."
On the internet I found that I have to call the comment line / ssh:
./mage mage-setup
But my problem is I do not have access to ssh on the production shared server.
What can I do to install extensions / the channel?
The latest Version 1.9.1.0 is installed....
Forward thanks,
René
Solved! Go to Solution.
Maybe your web server does not have outgoing access to internet?
Many thanks to all of you!
It tool some time, but the final solution was a blocking firewall!
The hoster added a HTTPS-Exception for connect20.magentocommerce.com in the firewall and it worked!
Greets,
René
Usually ./mage mage-setup works. If you don't have permission to run that shell script, that's the issue....
You can always untar the .tar.gz file with something like 7-zip. Then just manually copy/sync the files over the root of your Magento install. I'd never use the web interface to install an extension, it's very buggy and prone to failures.
Do you have a dev copy of your site? Or a copy of your site running on your local computer? You might be able to resolve this using a dev copy by running the command there, but if you don't have a copy of your site, that wouldn't be possible.
You could also ask your web host to please run those commands for you, depending on the host they might be willing to.
Finally, if none of that works, I was able to find a very old thread on Stack Overflow (https://stackoverflow.com/questions/7970939/magento-connect-error-the-community-channel-is-not-insta... where someone recommended saving the settings on the 'Settings' tab of the Downloader. That could be worth a shot.
In order to do that, visit <your site's URL>/downloader/ and login with your Magento admin credentials.
Then click the "Settings" tab below the words "Magento Connect Manager"
Then click "Save Settings".
Then try again. No guarantees that it will work, but it's worth a shot.
Thank you for your answers!
I solved the problem with calling the command with php:
I created a simple php script that does the following:
<?php echo shell_exec("./mage mage-setup"); ?>
It worked, but the final answer is: "Error: channel-add: couldn't connect to host"
So still not solved....
Maybe your web server does not have outgoing access to internet?
I think so, the fact that it couldn't locate the host tells me something is firewalled. I'd advise to install this locally then just sync up the files, or get a decent host that allows you to run shell scripts.
Really, really good thinking to put that into a PHP script. Also, funny that your host doesn't give you SSH access, but does allow you to run shell_exec. Some hosts... :\
Anyway, most likely your host is firewalling you. Some hosts will firewall outbound connections from PHP scripts, some will prevent you from even attempting to make an outbound connection from a PHP script. That sort of host, generally, isn't going to work well with Magento.
I'd contact your hosting provider and ask them if they have some sort of firewall on outbound requests, or if they're preventing certain PHP functions like file_get_contents from connecting to remote servers.
PEAR's downloadHttp function, which is most likely what is returning that error, uses the function fsockopen which uses sockets. It's possible that your host has disabled support for sockets or you're running on an odd server configuration that PHP can't use sockets on.
If your host says they aren't blocking anything, the next step would be to write a PHP file that attempts to open a connection using fsockopen and testing that. Something like this:
<?php
$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
echo "Connected successfully!<br />\n";
}
?>
If that fails, then you know it's not a problem with Magento or Magento Connect, it's a problem with your host.