adamata Posted June 28, 2010 Posted June 28, 2010 Hi, I'm setting up an online store, and until now everything has worked. I'm using a Canada Post extension for my OpenCart shopping cart to calculate shipping and provide shipping options. What I'm having trouble with is when a customer is at the second step of checking out an error message is being displayed as follows at the top of the page. Warning: fsockopen() [function.fsockopen]: unable to connect to sellonline.canadapost.ca:30000 (Connection timed out) in /home/*****/public_html/store/catalog/model/shipping/canadapost.php on line 185 Further down on the page under Shipping Method, it says as follows. "Error connecting to Canada Post" I posted my issue on the forums of OpenCart, and they said as follows. "A lot of hosts are disabling fsock for some reason in favor of curl. Curl is great but there is no good reason to disable fsock. Ask your host to allow fsock or the module will need to be changed to use curl to work for your servers" Is this the problem? Is fsock disabled? If so, is it possible to enable it? Here is a link to the OpenCart forum if you want to read my full post. My user name is the same as it is here (which is adamata). http://forum.opencart.com/viewtopic.php?p=81062#p81062 Thanks.
Byron Posted June 28, 2010 Posted June 28, 2010 This support request is being escalated to our root admin.
Ashoat Posted June 28, 2010 Posted June 28, 2010 fsock isn't disabled, but opening arbitrary outgoing (and incoming) ports is... so in effect, you can't really use fsock. The reason we disable it is because a lot of people write exploits using scripts that attack other servers' daemons running on arbitrary ports.
adamata Posted June 29, 2010 Author Posted June 29, 2010 fsock isn't disabled, but opening arbitrary outgoing (and incoming) ports is... so in effect, you can't really use fsock. The reason we disable it is because a lot of people write exploits using scripts that attack other servers' daemons running on arbitrary ports. Is cURL supported/enabled? If I change the extension module to use curl instead of fsockopen, do you think that would work?
Ashoat Posted June 30, 2010 Posted June 30, 2010 I don't think it would work on that port. You'd need to use a standard port (at which point fsockopen would be working anyways).
Recommended Posts