Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Failure with blank 'curl_error' executing request. #61

Open
raintonr opened this issue Aug 24, 2016 · 6 comments
Open

Failure with blank 'curl_error' executing request. #61

raintonr opened this issue Aug 24, 2016 · 6 comments

Comments

@raintonr
Copy link

I'm having problems with this library. I have traced this to the curl_exec call failing.

Unfortunately curl_error is returning a blank string so I really have no idea as to what is going wrong. This is very frustrating and don't know whether this is a PHP bug (am on Centos with PHP 5.4.16) or something else.

I will try and figure out why the error is blank and report back.

@raintonr
Copy link
Author

raintonr commented Aug 24, 2016

OK, so I discovered if we add curl_errno in there too then it gives a number that lead me to the problem. The response needs updating to (or similar):

$response = 'Curl error: ' . curl_errno ( $c ) . ' - ' . curl_error ( $c );

@calcinai
Copy link

calcinai commented Aug 24, 2016

@raintonr - what is the actual errno?

@raintonr
Copy link
Author

It depends of course. In my case it was 77 because the path to my CA file was incorrect.

@calcinai
Copy link

calcinai commented Aug 24, 2016

Oh right, so this is no longer an issue? It sounded like you were stuck on the error!

@raintonr
Copy link
Author

I was stuck, but was only able to become un-stuck because I modified the code to output the errno. My point is, to output a blank string on error is useless and the library should be modified to include the errno to better aide debugging.

@calcinai
Copy link

You're preaching to the choir! I wish that was all that needed fixing...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants