Results 1 to 1 of 1
Jul 22, 2008, 11:46 #1
CLI CURL problem, happens only on the CLI?
I have a php script that runs from command line and makes an https request to paypal, using curl. It works fine if I run it from a web page. It fails if I run it from CLI. The error I get from the CLI:
* About to connect() to api-3t.sandbox.paypal.com port 443
* Trying 18.104.22.168... * connected
* Connected to api-3t.sandbox.paypal.com (22.214.171.124) port 443
* successfully set certificate verify locations:
* CAfile: /usr/share/ssl/certs/ca-bundle.crt
* Unknown SSL protocol error in connection to api-3t.sandbox.paypal.com:443
* Closing connection #0
*** glibc detected *** free(): invalid pointer: 0x00dc8c80 ***
Again, if I view the script from the browser it runs fine, no errors..
I also tried running it as root on the CLI in case it was a permissions problem.
When I echo phpinfo() from the CLI, it looks the same as when I print it in the browser. I even threw in an obscure setting in there to compare it with both. CURL shows up in both:
CURL support => enabled
CURL Information => libcurl/7.12.1 OpenSSL/0.9.7a zlib/1.2.3 libidn/0.5.6
$ php -v
PHP 5.1.4 (cli) (built: Jun 8 2006 18:09:19)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
$ php -m