CURL Error 28

Views: 9,957

Results 1 to 17 of 17
15 Jun 2020, 9:34 PM
#1
astm0652 avatar

astm0652

New Zenner

Join Date:
Sep 2017
Location:
United States
Posts:
14
Plugin Contributions:
0

CURL Error 28

Hi Guys,

PHP Version: 5.4.45
Zen Cart Version: 1.5.1
Database: MySQL 5.5
Server OS: Linux
HTTP Server: Apache/2.4.43
Godaddy VPS
Site URL:adulttoyssupermart.com

My site was working fine for over a 1 year, and for the past week my credit card transaction through PayPal express is not appearing in my Zen Cart admin but appearing in PayPal. I took a look at the debug file and i see this error message CURL Error 28. Can someone look at the attached debug file and let me know how to fix this. It will be well appreciated!

16 Jun 2020, 7:14 PM
#2
astm0652 avatar

astm0652

New Zenner

Join Date:
Sep 2017
Location:
United States
Posts:
14
Plugin Contributions:
0

Re: CURL Error 28

Any help with this thread?

More info:

curltester.php

Array
(
[url] => "http://www.zen-cart.com/testcurl.php"
[content_type] =>
[http_code] => 301
[header_size] => 373
[request_size] => 212
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.163397
[namelookup_time] => 0.053317
[connect_time] => 0.105027
[pretransfer_time] => 0.105128
[size_upload] => 37
[size_download] => 0
[speed_download] => 0
[speed_upload] => 226
[download_content_length] => -1
[upload_content_length] => 37
[starttransfer_time] => 0.163328
[redirect_time] => 0
[certinfo] => Array
(
)

[primary_ip] => 172.67.134.32
[primary_port] => 80
[local_ip] => 198.12.152.24
[local_port] => 34892
[redirect_url] => https://www.zen-cart.com/testcurl.php

)

curltester.php?paypal=1

4 OpenSSL was built without SSLv3 support
Array
(
[url] => "https://api-3t.paypal.com/nvp"
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 1
[redirect_count] => 0
[total_time] => 0.059446
[namelookup_time] => 0.001015
[connect_time] => 0.059314
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => -1
[starttransfer_time] => 0
[redirect_time] => 0
[certinfo] => Array
(
)

[primary_ip] => 173.0.88.69
[primary_port] => 443
[local_ip] => 198.12.152.24
[local_port] => 59854
[redirect_url] => 

)

EOF

curltester.php?ssl=1

4 OpenSSL was built without SSLv3 support
Array
(
[url] => "https://www.zen-cart.com/testcurl.php"
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 1
[redirect_count] => 0
[total_time] => 0.105916
[namelookup_time] => 0.054076
[connect_time] => 0.10578
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => -1
[starttransfer_time] => 0
[redirect_time] => 0
[certinfo] => Array
(
)

[primary_ip] => 104.28.7.98
[primary_port] => 443
[local_ip] => 198.12.152.24
[local_port] => 48686
[redirect_url] => 

)

16 Jun 2020, 7:37 PM
#3
drbyte avatar

drbyte

Sensei

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

Re: CURL Error 28

You're going to find it increasingly difficult to support your old PHP 5.4 server as time goes along. PHP 5.4 has been obsolete for a couple years already. Out-of-the-box it has no awareness of the modern TLS methods for talking to servers (maybe GoDaddy has patched it somehow, I dunno?)

The "OpenSSL wasn't compiled with SSLv3" errors are simply a reflection that the curltester you're using is trying to use a completely outdated type of SSL/TLS connection. You might try grabbing the latest from https://github.com/zencart/zencart/tree/v157/extras and try again.

CURL error 28 means "operation timed out" ... meaning, in theory, "we tried to connect to PayPal to make a transaction, but the connection didn't complete in the allowed timeframe" ... where the timeframe is typically 6-10 seconds ... which is a LONG time just to connect.

"why" it's timing out is indeed the thing you need to chase down.
It could be your server.
It could be your PHP version.
It could be firewalls.
It could be PayPal is rejecting your incoming transaction requests because they're coming from a format they no longer support. That wouldn't surprise me given you're using ZC v1.5.1 which was released in 2012.
While, yes, I'll absolutely advocate that you should be upgrading, I realize that's not a helpful statement when you just want transactions to work again. It would indeed be helpful to know exactly "why" in order to be certain that upgrading is the key step or not. Upgrading should still be done, but I agree it'd be helpful to get payments working first if possible and then spend time on an upgrade while transactions are still happening.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Jun 2020, 8:05 PM
#4
astm0652 avatar

astm0652

New Zenner

Join Date:
Sep 2017
Location:
United States
Posts:
14
Plugin Contributions:
0

Re: CURL Error 28

Thank you for replying. I got my work cut out for me lol, i'll keep you posted.

Thank You Again!

16 Jun 2020, 8:15 PM
#5
astm0652 avatar

astm0652

New Zenner

Join Date:
Sep 2017
Location:
United States
Posts:
14
Plugin Contributions:
0

Re: CURL Error 28

New curltester.php

Connection uses TLS 1.3

Testing communications to various destinations. This is a simple diagnostic to determine whether your server can connect to common destinations.
For advanced "details" mode, add ?details=on to the URL.

(Another resource you may find useful for testing your server's overall customer-facing SSL configuration: https://www.ssllabs.com/ssltest/index.html )

Connecting to Zen Cart Version Server (http) ...
GOOD: CURL Connection successful.

Connecting to Zen Cart Version Server (https) ...
GOOD: CURL Connection successful.

Connecting to Zen Cart Support Server (https) ...
GOOD: CURL Connection successful.

Connecting to USPS (port 80)...
GOOD: CURL Connection successful.

Connecting to USPS Test/Staging/Sandbox Server (port 80)...
GOOD: CURL Connection successful.

Connecting to UPS (port 80)...
GOOD: CURL Connection successful.

GOOD: Socket established

Connecting to UPSXML (onlinetools.ups.com) ...
GOOD: CURL Connection successful.

Connecting to UPSXML (sandbox) ...
GOOD: CURL Connection successful.

Connecting to FedEx (port 80)...
GOOD: Socket established

Connecting to Canada Post SellOnline HTTP/S ...
GOOD: CURL Connection successful.

Connecting to Canada Post REST API (SSL) ...
GOOD: CURL Connection successful.

Connecting to PayPal IPN (port 443)...
GOOD: Socket established

GOOD: CURL Connection successful.

Connecting to PayPal IPN (port 443) Sandbox ...
GOOD: Socket established

GOOD: CURL Connection successful.

Connecting to PayPal Express/Pro Server ...
GOOD: CURL Connection successful.

Connecting to PayPal Express/Pro Sandbox ...
GOOD: CURL Connection successful.

Connecting to PayPal Payflowpro Server ...
GOOD: CURL Connection successful.

Connecting to PayPal Payflowpro Pilot/Sandbox Server ...
GOOD: CURL Connection successful.

Connecting to PayPal TLSTest Server ...
Error 6: Could not resolve host: tlstest.paypal.com

Connecting to Cardinal Commerce 3D-Secure Server ...
GOOD: CURL Connection successful.

Connecting to Square Payments Server ...
GOOD: CURL Connection successful.

Connecting to AuthorizeNet Production Server ...
GOOD: CURL Connection successful.

Connecting to AuthorizeNet Developer/Sandbox Server ...
GOOD: CURL Connection successful.

Connecting to First Data GGe4 server (SSL)...
GOOD: CURL Connection successful.

Connecting to Elavon Server...
GOOD: CURL Connection successful.

Connecting to Elavon Sandbox Server...
GOOD: CURL Connection successful.

Testing completed. See results above.

curltester.php?paypal=1

Connection uses TLS 1.3

Testing communications to various destinations. This is a simple diagnostic to determine whether your server can connect to common destinations.
For advanced "details" mode, add ?details=on to the URL.

(Another resource you may find useful for testing your server's overall customer-facing SSL configuration: https://www.ssllabs.com/ssltest/index.html )

Connecting to Zen Cart Version Server (http) ...
GOOD: CURL Connection successful.

Connecting to Zen Cart Version Server (https) ...
GOOD: CURL Connection successful.

Connecting to Zen Cart Support Server (https) ...
GOOD: CURL Connection successful.

Connecting to USPS (port 80)...
GOOD: CURL Connection successful.

Connecting to USPS Test/Staging/Sandbox Server (port 80)...
GOOD: CURL Connection successful.

Connecting to UPS (port 80)...
GOOD: CURL Connection successful.

GOOD: Socket established

Connecting to UPSXML (onlinetools.ups.com) ...
GOOD: CURL Connection successful.

Connecting to UPSXML (sandbox) ...
GOOD: CURL Connection successful.

Connecting to FedEx (port 80)...
GOOD: Socket established

Connecting to Canada Post SellOnline HTTP/S ...
GOOD: CURL Connection successful.

Connecting to Canada Post REST API (SSL) ...
GOOD: CURL Connection successful.

Connecting to PayPal IPN (port 443)...
GOOD: Socket established

GOOD: CURL Connection successful.

Connecting to PayPal IPN (port 443) Sandbox ...
GOOD: Socket established

GOOD: CURL Connection successful.

Connecting to PayPal Express/Pro Server ...
GOOD: CURL Connection successful.

Connecting to PayPal Express/Pro Sandbox ...
GOOD: CURL Connection successful.

Connecting to PayPal Payflowpro Server ...
GOOD: CURL Connection successful.

Connecting to PayPal Payflowpro Pilot/Sandbox Server ...
GOOD: CURL Connection successful.

Connecting to PayPal TLSTest Server ...
Error 6: Could not resolve host: tlstest.paypal.com

Connecting to Cardinal Commerce 3D-Secure Server ...
GOOD: CURL Connection successful.

Connecting to Square Payments Server ...
GOOD: CURL Connection successful.

Connecting to AuthorizeNet Production Server ...
GOOD: CURL Connection successful.

Connecting to AuthorizeNet Developer/Sandbox Server ...
GOOD: CURL Connection successful.

Connecting to First Data GGe4 server (SSL)...
GOOD: CURL Connection successful.

Connecting to Elavon Server...
GOOD: CURL Connection successful.

Connecting to Elavon Sandbox Server...
GOOD: CURL Connection successful.

Testing completed. See results above.

curltester.php?ssl=1

Connection uses TLS 1.3

Testing communications to various destinations. This is a simple diagnostic to determine whether your server can connect to common destinations.
For advanced "details" mode, add ?details=on to the URL.

(Another resource you may find useful for testing your server's overall customer-facing SSL configuration: https://www.ssllabs.com/ssltest/index.html )

Connecting to Zen Cart Version Server (http) ...
GOOD: CURL Connection successful.

Connecting to Zen Cart Version Server (https) ...
GOOD: CURL Connection successful.

Connecting to Zen Cart Support Server (https) ...
GOOD: CURL Connection successful.

Connecting to USPS (port 80)...
GOOD: CURL Connection successful.

Connecting to USPS Test/Staging/Sandbox Server (port 80)...
GOOD: CURL Connection successful.

Connecting to UPS (port 80)...
GOOD: CURL Connection successful.

GOOD: Socket established

Connecting to UPSXML (onlinetools.ups.com) ...
GOOD: CURL Connection successful.

Connecting to UPSXML (sandbox) ...
GOOD: CURL Connection successful.

Connecting to FedEx (port 80)...
GOOD: Socket established

Connecting to Canada Post SellOnline HTTP/S ...
GOOD: CURL Connection successful.

Connecting to Canada Post REST API (SSL) ...
GOOD: CURL Connection successful.

Connecting to PayPal IPN (port 443)...
GOOD: Socket established

GOOD: CURL Connection successful.

Connecting to PayPal IPN (port 443) Sandbox ...
GOOD: Socket established

GOOD: CURL Connection successful.

Connecting to PayPal Express/Pro Server ...
GOOD: CURL Connection successful.

Connecting to PayPal Express/Pro Sandbox ...
GOOD: CURL Connection successful.

Connecting to PayPal Payflowpro Server ...
GOOD: CURL Connection successful.

Connecting to PayPal Payflowpro Pilot/Sandbox Server ...
GOOD: CURL Connection successful.

Connecting to PayPal TLSTest Server ...
Error 6: Could not resolve host: tlstest.paypal.com

Connecting to Cardinal Commerce 3D-Secure Server ...
GOOD: CURL Connection successful.

Connecting to Square Payments Server ...
GOOD: CURL Connection successful.

Connecting to AuthorizeNet Production Server ...
GOOD: CURL Connection successful.

Connecting to AuthorizeNet Developer/Sandbox Server ...
GOOD: CURL Connection successful.

Connecting to First Data GGe4 server (SSL)...
GOOD: CURL Connection successful.

Connecting to Elavon Server...
GOOD: CURL Connection successful.

Connecting to Elavon Sandbox Server...
GOOD: CURL Connection successful.

Testing completed. See results above.

17 Jun 2020, 10:01 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: CURL Error 28

astm0652:

for the past week my credit card transaction through PayPal express is not appearing in my Zen Cart admin but appearing in PayPal.

Please clarify. Are you saying "purchases work correctly, but in my Zen Cart Admin I can see the orders but I can no longer inspect details of Express Checkout payments"?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Jun 2020, 4:35 PM
#7
astm0652 avatar

astm0652

New Zenner

Join Date:
Sep 2017
Location:
United States
Posts:
14
Plugin Contributions:
0

Re: CURL Error 28

Orders that are paid by credit card are not showing in new orders in admin, but PayPal has the order information and not me.

21 Jun 2020, 9:31 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: CURL Error 28

astm0652:

Orders that are paid by credit card are not showing in new orders in admin, but PayPal has the order information and not me.

That's symptomatic of whatever PHP errors are occurring when submitting the transaction. If PayPal has the details (ie: the payment) but your store does not then it means a PHP fatal error happened after/during the transaction response and the store wasn't able to finish saving the order or sending the emails.

Normally Zen Cart will log fatal PHP errors in the /logs/ directory.
If those logs are indicating CURL problems, you'll probably need to work with your hosting company to sort that out.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Jun 2020, 5:14 PM
#9
astm0652 avatar

astm0652

New Zenner

Join Date:
Sep 2017
Location:
United States
Posts:
14
Plugin Contributions:
0

Re: CURL Error 28

I'm going to check the error the logs. Does this help to solving the problem?

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

Thank You DrByte

23 Jun 2020, 3:16 AM
#10
drbyte avatar

drbyte

Sensei

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

Re: CURL Error 28

astm0652:

I'm going to check the error the logs. Does this help to solving the problem?

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

Not really.

81002 is a very generic PayPal error that suggests the request being transmitted is malformed and doesn't make sense to them.
But that would be completely different from a CURL error 28 which means connection timed out, because if it's timed out then it's not getting a response.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Jun 2020, 3:24 AM
#11
drbyte avatar

drbyte

Sensei

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

Re: CURL Error 28

If this happened "out of the blue", (ie: was working and then suddenly isn't) then there are numerous things to check ... because obviously "something" changed.

Between the time when things were "working", and now they're "not" ...

  • what software updates has the hosting company installed on the server?
  • did they change PHP versions? Apache version? These could have changed default configuration settings in php.ini
  • who has had access to your server's control panel?
  • have they made any changes to anything, especially PHP/Apache settings?
  • who has had FTP or filesystem access to your server?
  • have the uploaded/edited anything? Are you sure?

Have you been making regular backups of your server's files and your store database?

It's worth taking a copy of your server's current files and database, and comparing them against a backup from before the problem happened. This can help identify unexpected/unauthorized changes. In short, it's worth proving nothing's been tampered with, by going through these steps until you've verified that nothing unauthorized has happened: https://www.zen-cart.com/wiki/index.php/Recovering_From_Hacks

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Jun 2020, 5:20 PM
#12
astm0652 avatar

astm0652

New Zenner

Join Date:
Sep 2017
Location:
United States
Posts:
14
Plugin Contributions:
0

Re: CURL Error 28

This is the error i'm getting from my log, hope this helps.

PHP Warning: Illegal string offset 'cost' in /home/pkpoker/public_html/includes/classes/order.php on line 355

Thank You DrByte

25 Jun 2020, 7:54 PM
#13
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: CURL Error 28

This is a mod. There's no such field in vanilla Zen Cart.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

26 Jun 2020, 1:26 PM
#14
drbyte avatar

drbyte

Sensei

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

Re: CURL Error 28

swguy:

This is a mod. There's no such field in vanilla Zen Cart.
Actually, yes there is. The OP said they're using v1.5.1.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Jun 2020, 1:30 PM
#15
drbyte avatar

drbyte

Sensei

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

Re: CURL Error 28

astm0652:

This is the error i'm getting from my log, hope this helps.

PHP Warning: Illegal string offset 'cost' in /home/pkpoker/public_html/includes/classes/order.php on line 355

in v1.5.1 the line reads:

                        'shipping_cost' => $_SESSION['shipping']['cost'],

in v1.5.7 it's using the following, which you can safely use in v1.5.1 as well:

                        'shipping_cost' => !empty($_SESSION['shipping']['cost']) ? $_SESSION['shipping']['cost'] : 0,

While this isn't technically a "bug", there have been some bugs fixed in various Zen Cart versions associated with mixed ways of representing that $_SESSION['shipping'] array.

If you're going to stay on v1.5.1 then you should also keep watching for all bugs fixed in newer versions and backport them to your old version.

That said, this "PHP Warning" is just a warning. Warnings sometimes do point to underlying issues. I don't think this one is affecting/causing your CURL issues or the issue of orders not completing. I would expect that a "PHP Fatal error" is happening somewhere to cause the issues you were reporting.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jul 2020, 4:32 PM
#16
yueli7 avatar

yueli7

New Zenner

Join Date:
Jul 2009
Posts:
10
Plugin Contributions:
0

Re: CURL Error 28

Hi, jumping in here as I also have the same issue since start of July,
Connecting to PayPal Express/Pro Server ... Error 28: Connection timed out after 5000 milliseconds
Connecting to PayPal TLSTest Server ... Error 51: SSL: no alternative certificate subject name matches target host name 'tlstest.paypal.com'

Apart from hosting issues, I'm wondering if this has got anything to do with Paypal's NVP deprecation to REST?

9 Jul 2020, 5:28 PM
#17
drbyte avatar

drbyte

Sensei

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

Re: CURL Error 28

The "tlstest.paypal.com" host was retired awhile back.
The latest curltester script doesn't check it anymore.

The paypal servers still respond from all parts of the world that I've been able to check.
Error 28 means a timeout happened, either during DNS lookup (a hosting configuration issue) or during attempting to connect (no response, which could be a firewall issue with your server/hosting-company, a server-overload (ie: slow) on the destination server, or the destination server is down, affecting everyone globally).

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.