Re: [PHP] curl + ssl and invalid certificate
* Thus wrote Richard Davey ([EMAIL PROTECTED]): > Hi all, > > Does anyone know how to get curl to accept the ssl cert *regardless* > of how ballsed-up it is? I've nver tried it but perhaps: CURLOPT_SSL_VERIFYPEER 0 and/or CURLOPT_SSL_VERIFYHOST 0 Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] curl + ssl and invalid certificate
Hi all, This is a very specific problem so I'm not holding out too much luck, but I am working on a script that must POST data to a secure server so I'm using curl for this. curl works perfectly including on ssl sites like PayPal.com - but the test server I am connecting to has an invalid site certificate warning come up (saying that the domain doesn't match the issuer, etc). My PHP script is pretty straight forward and doesn't have much beyond the standard setopts needed for curl but when I access it in a browser it is actually causing Apache (2.0.49) on to crash! Does anyone know how to get curl to accept the ssl cert *regardless* of how ballsed-up it is? -- Best regards, Richard Davey http://www.launchcode.co.uk / PHP Development Services http://www.phpcommunity.org/wiki/296.html / PHP Community -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CURL - SSL
You need php compiled with openssl support. http://www.php.net/openssl Rodrigo Nakahodo wrote: Anyone knows how to get a simple(HTML) https response using CURL session. Thanks a million!! Rodrigo Nakahodo --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] CURL - SSL
Anyone knows how to get a simple(HTML) https response using CURL session. Thanks a million!! Rodrigo Nakahodo --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CURL & SSL
cURL needs to be compiled with SSL support. ./configure --with-ssl=SSLPATH where SSLPATH is the actual path to where openssl can be found. ./configure --with-ssl=/usr works for me. Jim Grill Support Web-1 Hosting http://www.web-1hosting.net - Original Message - From: "Oscar F" <[EMAIL PROTECTED]> To: "Jonathan Rosenberg" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, July 27, 2002 1:42 PM Subject: Re: [PHP] CURL & SSL > Jonathan, > > The exact same thing is happening to me right now, only that I'm working > with the "Concord" people, not with authorize... it says SSL is enabled when > I ask for the info. > > The reason why you're not getting the values, is that cURL is telling PHP: > curl: (1) libcurl was built with SSL disabled, https: not supported! > > You can see this if you have shell access, and type on command line: curl > "https://...";. > > I've tried all that I have found on the cURL mailing list history (make > distclean, ./configure --with-ssl=SSLPATH, make install)..etc..etc.. but > nothing works... Anyone has a solution?. > > Oscar F.- > > - Original Message ----- > From: "Jonathan Rosenberg" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, July 27, 2002 1:50 PM > Subject: [PHP] CURL & SSL > > > > I am on a server that has CURL & OpenSSL enabled. I assumed that this > meant > > that I could do https: requests via CURL. But for some reason, my > attempts > > to do this are not working. > > > > If I do a CURL http: request, everything works fine (i.e., I get the web > > page, as expected). But if I use an https: request, no value is returned. > > > > Do I need to do something else to make https: requests work in CURL? > > > > Here's the code in question: > > > > $ch = curl_init("https://secure.authorize.net/gateway/transact.dll";); > > curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); > > $result = curl_exec($ch); > > > > In this case, $result is the null string (if you try that URL in your > > browser, you will that some text is returned). If I replace the curl_init > > with > > > > $ch = curl_init("http://www.cnet.com";); > > > > I get the expected string in $result. > > > > Any thoughts? > > > > -- > > JR > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CURL & SSL
Jonathan, The exact same thing is happening to me right now, only that I'm working with the "Concord" people, not with authorize... it says SSL is enabled when I ask for the info. The reason why you're not getting the values, is that cURL is telling PHP: curl: (1) libcurl was built with SSL disabled, https: not supported! You can see this if you have shell access, and type on command line: curl "https://...";. I've tried all that I have found on the cURL mailing list history (make distclean, ./configure --with-ssl=SSLPATH, make install)..etc..etc.. but nothing works... Anyone has a solution?. Oscar F.- - Original Message - From: "Jonathan Rosenberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 27, 2002 1:50 PM Subject: [PHP] CURL & SSL > I am on a server that has CURL & OpenSSL enabled. I assumed that this meant > that I could do https: requests via CURL. But for some reason, my attempts > to do this are not working. > > If I do a CURL http: request, everything works fine (i.e., I get the web > page, as expected). But if I use an https: request, no value is returned. > > Do I need to do something else to make https: requests work in CURL? > > Here's the code in question: > > $ch = curl_init("https://secure.authorize.net/gateway/transact.dll";); > curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); > $result = curl_exec($ch); > > In this case, $result is the null string (if you try that URL in your > browser, you will that some text is returned). If I replace the curl_init > with > > $ch = curl_init("http://www.cnet.com";); > > I get the expected string in $result. > > Any thoughts? > > -- > JR > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] CURL & SSL
I am on a server that has CURL & OpenSSL enabled. I assumed that this meant that I could do https: requests via CURL. But for some reason, my attempts to do this are not working. If I do a CURL http: request, everything works fine (i.e., I get the web page, as expected). But if I use an https: request, no value is returned. Do I need to do something else to make https: requests work in CURL? Here's the code in question: $ch = curl_init("https://secure.authorize.net/gateway/transact.dll";); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); In this case, $result is the null string (if you try that URL in your browser, you will that some text is returned). If I replace the curl_init with $ch = curl_init("http://www.cnet.com";); I get the expected string in $result. Any thoughts? -- JR -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php