Jump to content

[Solved] fsock and Opencart


adamata

Recommended Posts

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. :huh:

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...