Zen Cart Logo
Forums / Installing on a Linux/Unix Server / CUrl Problems install 1.3.8a

CUrl Problems install 1.3.8a

Locked

Views: 3,954

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
24 Oct 2008, 4:04 PM
#1
wiregrass avatar

wiregrass

New Zenner

Join Date:
Sep 2006
Posts:
26
Plugin Contributions:
0

CUrl Problems install 1.3.8a

Please read the entire post before replying. Although my problem is similar to other postings, I could not find it answered elsewhere.

  1. Am receiving the following errors on installation:
    CURL problems 6: name lookup timed out
    Curl Requires SSL support... 6
    Curl Problems detected: 28 => connect timed out
    Curl requires SSL support. 7 (couldn't connect with host

  2. This is the third Zencart on this server and all three have the same problems. I can continue installation and purchase with PayPal, but the first order is not recorded as order # 1. Order number 2 is returned as order #1. When the first customer goes into their account they see they are indeed order #1 but their receipt shows no order number. When Customer #2 looks at his receipt he sees his order was number 1, but it shows in the databse and in the admin as order #2. This has the potential to cause great confusion down the road.

  3. I have CURL installed and enabled on this server and have verified that using phpinfo.php.

  4. I have run the CURL test with ZenCart and it returns OK.
    CURL Test Page

This page is intended for testing CURL behaviour. You should be accessing this page via CURLTEST.PHP running on YOUR server.
You submitted the following fields and data:
Array( [field1] => This is a test [statuskey] => ready)Data validation

Good
Other Info

Your server IP address is:209.235...

Array( [url] => "https://www.zen-cart.com/testcurl.php" [content_type] => text/html [http_code] => 200 [header_size] => 139 [request_size] => 174 [filetime] => -1 [ssl_verify_result] => 20 [redirect_count] => 0 [total_time] => 5.25914 [namelookup_time] => 4.99798 [connect_time] => 5.037139 [pretransfer_time] => 5.206257 [size_upload] => 0 [size_download] => 2142 [speed_download] => 407 [speed_upload] => 0 [download_content_length] => 0 [upload_content_length] => 0 [starttransfer_time] => 5.2591 [redirect_time] => 0)

  1. Another post suggested there may be a setting wrong in Apache Set-up. What setting might that be?Do you have any other suggestions to fix this problem?

Everything we have done suggests CURL is OK.

Thank you for your time and assistance.

24 Oct 2008, 4:44 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: CUrl Problems install 1.3.8a

If you don't have your own server or any strange settings in the .htaccess, I'd be talking to my host.

24 Oct 2008, 4:49 PM
#3
wiregrass avatar

wiregrass

New Zenner

Join Date:
Sep 2006
Posts:
26
Plugin Contributions:
0

Re: CUrl Problems install 1.3.8a

Thank you for your reply. We have a dedicated server with some support, but they cannot figure out the problem either. This is the second server with the company. The first we have had no problems with and the php settings are identical. This is something I have to figure out with Community support or it may never get fixed.

As for the .htaccess, the file has not been changed from the standard included with ZenCart.

Again, thank you.

25 Oct 2008, 12:20 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: CUrl Problems install 1.3.8a

If you run the curltest.php script with ?paypal=1 added to the URL, what is the output?

Which PayPal modules do you have enabled in Admin->Modules->Payment? and why?

25 Oct 2008, 12:51 AM
#5
wiregrass avatar

wiregrass

New Zenner

Join Date:
Sep 2006
Posts:
26
Plugin Contributions:
0

Re: CUrl Problems install 1.3.8a

?paypal=1 shows the following

6 name lookup timed out

Array
(
[url] => https://api-3t.paypal.com/nvp
[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)

EOF

The only PayPal module set up is PayPal Websites Payments Standard. I set that up to quickly test the cart.

25 Oct 2008, 1:31 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: CUrl Problems install 1.3.8a

Wiregrass:

6 name lookup timed out
That's telling you that when the server tries to lookup the IP address of the URL it's trying to connect to, your nameserver services on your server is failing to give a response back in a reasonable time.

This indicates a server misconfiguration. Perhaps you've got your resolv.conf files misconfigured?

If it's only happening when trying to access HTTPS: addresses, maybe you've got something wrong with your SSL configuration?

The ?paypal=1 test tries to talk to the PayPal server using SSL ... and, as you said, it's failing.
If you try using ?ssl=1 it will try to talk to the Zen Cart site using SSL. What happens?

The installer process tries to talk to the Zen Cart site using both non-SSL and SSL modes ... that's why you're seeing 4 error messages on the install screen ... 2 for each attempt.

25 Oct 2008, 4:04 AM
#7
wiregrass avatar

wiregrass

New Zenner

Join Date:
Sep 2006
Posts:
26
Plugin Contributions:
0

Re: CUrl Problems install 1.3.8a

Thank you for such a great reply!

Here's what happened. Based on your email our server tech deleted a nameserver in resolv.conf and added our own plesk ip. We re-ran the test (?paypal=1) and it now reads:

Array
(
[url] => https://api-3t.paypal.com/nvp
[content_type] => text/plain; charset=utf-8
[http_code] => 200
[header_size] => 215
[request_size] => 166
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.384203
[namelookup_time] => 0.061353
[connect_time] => 0.11846
[pretransfer_time] => 0.241251
[size_upload] => 0
[size_download] => 146
[speed_download] => 380
[speed_upload] => 0
[download_content_length] => 146
[upload_content_length] => 0
[starttransfer_time] => 0.384165
[redirect_time] => 0)

ACK=Failure&L_ERRORCODE0=81002&L_SHORTMESSAGE0=Unspecified%20Method&L_LONGMESSAGE0=Method%20Specified%20is%20not%20Supported&L_SEVERITYCODE0=ErrorEOF

It looks like in some respects we're making headway.
Again, thank you for your time and knowledge.

25 Oct 2008, 6:19 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: CUrl Problems install 1.3.8a

The response you posted is exactly what I would want to see.

(Even though it's showing an error message, that message is coming from the PayPal server ... which means communication was successful!)

25 Oct 2008, 1:22 PM
#9
wiregrass avatar

wiregrass

New Zenner

Join Date:
Sep 2006
Posts:
26
Plugin Contributions:
0

Re: CUrl Problems install 1.3.8a

Excellent. THANK YOU!!!!

28 Oct 2008, 1:04 AM
#10
wiregrass avatar

wiregrass

New Zenner

Join Date:
Sep 2006
Posts:
26
Plugin Contributions:
0

Re: CUrl Problems install 1.3.8a

We re-installed the ZenCart script today to clear the database of the errors and in re-install there were no error messages. Thank you for your help.

12 Nov 2008, 6:46 PM
#11
wiregrass avatar

wiregrass

New Zenner

Join Date:
Sep 2006
Posts:
26
Plugin Contributions:
0

Re: CUrl Problems install 1.3.8a

We have put another server online and installed Zencart on it. Again received the CURL errors on install as described in the first post. (http://thewoodpileinc.com:80/zc_install/index.php?main_page=inspect)

Ran the Curl Test and received this:

6 name lookup timed out

Array
(
[url] => "https://api-3t.paypal.com/nvp"
[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
)

Which indicates something is not right. We confirmed all the itmes causing the above problems on the server were fixed with same test results.

Then ran the PayPal test and came up with the message that indicated a postive response to PayPal.
[root@server3 ~]# links https://api-3t.paypal.com/nvp

ACK=Failure&L_ERRORCODE0=81002&L_SHORTMESSAGE0=Unspecified%20Method&L_LONGMESSAG
Any ideas? Thank you.

12 Nov 2008, 10:30 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: CUrl Problems install 1.3.8a

That message is telling you that when CURL was used to attempt connection to an external site, it failed to receive a response back when it asked the server for the address of the destination based on its name. Hence "name lookup" timeout.

Your server administrator is the one who should have the expertise in dealing with "name lookup timed out" issues.
As indicated earlier, resolv.conf is where the nameservers are specified to the server.
How CURL interacts with that is up to the server administrator to deal with.
Perhaps a visit to webhostingtalk.com or some other site that coaches server administrators might help.

12 Nov 2008, 11:14 PM
#13
wiregrass avatar

wiregrass

New Zenner

Join Date:
Sep 2006
Posts:
26
Plugin Contributions:
0

Re: CUrl Problems install 1.3.8a

I know that I am being a pain and bothering. I apologize. Please bear with me. My servers are dedicated servers and the host has limited knowledge of Plesk servers. We have reviewed the webhostingtalk forum you mentioned too.

We have re-looked at our resolv.conf and it appears to be set up correctly. As I mentioned, I have logged into server as root, and I have tried at the prompt:

curl https://api-3t.paypal.com/nvp

and received:

ACK=Failure&L_ERRORCODE0=81002&L_SHORTMESSAGE0=Unspecified%20Method&L_LONGMESSAGE0=Method%20Specified%20is%20not%20Supported&L_SEVERITYCODE0=Error

This reply is the message received when you said that was what you wanted to see... That this "error" message means that the server "talks" with the paypal server..

Then, here is the lookup done at the shell for the hostname server tries to connect:

host api-3t.paypal.com
api-3t.paypal.com has address 66.211.168.126

So, the resolv.conf contains a name server which resolves correctly..

But I am still having CURL warnings on install of Zencart.

Again, I apologize for beating a dead horse.

12 Nov 2008, 11:46 PM
#14
drbyte avatar

drbyte

Sensei

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

Re: CUrl Problems install 1.3.8a

Zen Cart runs PHP scripts via apache. It does not run via command-line. They're different.
Zen Cart uses CURL functions from inside PHP to talk to external services. It does not use CURL via command line. They're different.

So, it seems something's amuck with how your server's PHP configuration is set up to work with CURL.
Sorry, configuring the server is not an area where I have any interest in building specific expertise.
You'll have to address the matter with someone who knows what would cause CURL-via-PHP to not be able to do name lookups.

The curltest.php script uses the same logic as the zc_install inspection page for testing CURL communications.