Zen Cart Logo
Forums / Installing on a Linux/Unix Server / cURL and Currency update on Godaddy

cURL and Currency update on Godaddy

Locked

Views: 5,218

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
18 Jan 2008, 4:28 PM
#1
dieselmachine avatar

dieselmachine

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

cURL and Currency update on Godaddy

I tried to update currencies on godaddy, and there were a bunch of errors, and everything was set to 0.0000.

I made the necessary changes (proxy: true, and proxy= proxy.shr.secureserver.net:3128) in the configuration section of the admin area.

http://estradasphere.com/eshop/extras/curltest.php indicates things are fine.

http://estradasphere.com/eshop/extras/curltest.php?ssl=1 yields an error 28: timeout

http://estradasphere.com/eshop/extras/phpinfo.php has the following under curl:
CURL support enabled
CURL Information libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.2.3

So it should work with SSL right?

Does anyone know what could be causing this?

JT

18 Jan 2008, 4:42 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: cURL and Currency update on Godaddy

Does anyone know what could be causing this?
Yeah GoDaddy...
Get away from the "mass marketed" "cheap" hosts and go with a specialized host.
Like most you will pay a fee and 3% of every sale for Credit processing and for a modest shop that say does 2500/month this is $75 but when it comes to the hosting that allows all this to happen you want the cheapest you can find.

Sorry about the rant!!

18 Jan 2008, 5:24 PM
#3
dieselmachine avatar

dieselmachine

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: cURL and Currency update on Godaddy

Look, I understand that godaddy is absolute garbage. I cannot transfer right now, as I recently moved from California to Washington, and updating my contact info for the site apparently meant no transfers are allowed for 60 days or some silliness like that.

I plan on leaving. I hate godaddy with a vengeance, likely for the same reasons you do. But for now, I am stuck with it, so if we could avoid the ranting, can someone please help me solve this problem?

Is it even solvable?

18 Jan 2008, 5:32 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: cURL and Currency update on Godaddy

updating my contact info for the site apparently meant no transfers are allowed for 60 days or some silliness like that.
Can not transfer but this is not required Only a nameserver change is in order.

This is really a hosting issue and not a Zen Cart Issue and should be addressed by the one that can make required adjustments/suggestions and knows how the server is setup and this is Go Daddy

In the meantime You can search here for drbyte and curl as he has tools to check this and you can view admin > tools > server/version info > for curl settings etc

Note: I did say I was sorry!!!

18 Jan 2008, 7:50 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: cURL and Currency update on Godaddy

If your currencies got updated to "0" due to a failure to communicate to the currency servers, just set the correct exchange rates manually.

The rates obtained from xe.com and oanda.com are only approximations anyway ... not the real rates charged by your bank or CC companies.

Just edit each currency that you're actively using, and set the appropriate rate.

18 Jan 2008, 10:19 PM
#6
dieselmachine avatar

dieselmachine

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: cURL and Currency update on Godaddy

Ok, I didn't mean to imply that the currencies being set to zero was the problem. It is part of a bigger problem, namely curl not working. It seems others have been able to get it to work, while I can't (i spend hours researching something before even thinking about asking a question in a forum. I've read up on this a lot). So I am wondering, based on the errors I am getting, what the actual problem is, and how I could go about fixing it.

Even if it means calling godaddy and complaining about some sort of misconfigured aspect of my account, I need to know what exactly is configured wrong.

Or, alternately, someone can tell me that what I am looking for is not doable. I'm pretty sure that isn't the case though, based on what I've read on the internet.

Let's start with an easier question, that doesn't mention currencies anywhere. Why would curltest work normally, but not with ssl=1 appended? What could cause this error? What sort of server environment would make that not function?

18 Jan 2008, 10:30 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: cURL and Currency update on Godaddy

dieselmachine:

Let's start with an easier question, that doesn't mention currencies anywhere. Why would curltest work normally, but not with ssl=1 appended? What could cause this error? What sort of server environment would make that not function?

  1. The CURLTEST script natively does a connection on port 80 ... which in the case of GoDaddy, has no problem

  2. Adding ?SSL=1 attempts to connect over port 443 ... which for GoDaddy must go over their Proxy connection

  3. Adding ?ssl=1&proxy=1 will test SSL over Proxy, using GoDaddy's default proxy settings as the default choice of proxy gateway (since no other hosting company uses a curl proxy, this is generally a safe assumption)
    You might try this test out of curiosity.

  4. What sort of environment? Only GoDaddy. They're weird. And won't budge. Even a dedicated server plan isn't any better with them ... they send all their outbound communication over the proxy. They'll likely tell you that they do that in the name of security. Funny how others don't have to.
    Anyway, I'm trying not to get on a rant here.

Hopefully that answers your question.

18 Jan 2008, 11:11 PM
#8
dieselmachine avatar

dieselmachine

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: cURL and Currency update on Godaddy

I tried the &proxy=1 and it worked, no issues at all.

I never really checked the code, I assumed the value for $proxy was being grabbed from the database, while in actuality, it HAD to be specified as a GET variable.

So, now that the great mystery is solved, how do I make sure the currency updater knows to use the proxy?

Thanks for the help Dr Byte!

18 Jan 2008, 11:55 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: cURL and Currency update on Godaddy

dieselmachine:

how do I make sure the currency updater knows to use the proxy?The currency updater automatically uses the proxy if it's been enabled and correctly set in your Admin->Configuration->My Store area.
Details: http://www.zen-cart.com/forum/showthread.php?t=61528

19 Jan 2008, 12:17 AM
#10
dieselmachine avatar

dieselmachine

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: cURL and Currency update on Godaddy

Yeah, I already saw that page. I have already adjusted everything in there. That was, in fact, the very first thing I did.

I took it upon myself to go digging around in the source, since it seems to be assumed that I am some bloody amateur who has no idea how to configure basic settings. All the basic settings are configured correctly. I assure you.

I enabled the info mode in the localization file, and now receive this as debug data:

NFO:

Array
(
[url] => http://www.oanda.com/convert/fxdaily
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0.004
[connect_time] => 0.004
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)

INFO:

Array
(
[url] => http://www.xe.net/ucc/convert.cgi
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)

Repeat until currency list is done.

Any ideas why this wouldn't work?

what is error 403?

19 Jan 2008, 12:23 AM
#11
dieselmachine avatar

dieselmachine

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: cURL and Currency update on Godaddy

So in localization.php, I commented out this one line to fix everything:
curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, $proxy_tunnel_flag);

Everything works now.

Why didn't someone just tell me that to begin with? It's awfully unintuitive, you know. Instead, I am told "Make sure 'proxy' is set to true!".

Tssk tssk. Hopefully this thread will help someone else from being led in circles.

19 Jan 2008, 12:50 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: cURL and Currency update on Godaddy

403 means "forbidden"

dieselmachine:

Why didn't someone just tell me that to begin with? It's awfully unintuitive, you know. Instead, I am told "Make sure 'proxy' is set to true!".

Why?

Because you're never supposed to have to do that.
You're not supposed to have to touch code.

You'll find that the Zen Cart code is generally written to work with most hosting platforms ... even crappy GoDaddy. We really do try our best to make it work even on the worst hosts' servers. There are very few that really have problems.

Very seldom do we find that the http_tunnel setting needs to be overridden.
If you want to do that, you can add a quick override by creating a new file as follows:
/admin/includes/extra_datafiles/curl_tunnel_override.php

<?php define('CURL_PROXY_TUNNEL_FLAG', 'FALSE'); ?>

... and then you can leave the original code alone as it was intended.

Sorry that you think you're being treated as an amateur.
I'm glad you found the cause and your own workaround.

Best of luck in your store.