Welcome! Log In Create A New Profile

Advanced

504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

Ben Johnson
August 23, 2013 12:48PM
Hello,

I'm seeing a strange problem with nginx (1.5.2 on Windows) and PHP
(5.4.8 on Windows).

Whenever I make a cURL request with PHP's curl_exec() function to a
secure URL (https protocol), and I disable peer verification, like this

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

nginx responds with a "504 Gateway Time-out".

If I set CURLOPT_SSL_VERIFYPEER to TRUE, nginx responds with a "200 OK",
although curl_exec() returns false, which is expected due to the
verification failure (I'm using a self-signed certificate in nginx).

I have tried executing the same script under Apache and it functions as
expected with peer verification disabled.

Thank you for any help,

-Ben

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

Ben Johnson August 23, 2013 12:48PM

Re: 504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

Maxim Dounin August 23, 2013 02:08PM

Re: 504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

Ben Johnson August 23, 2013 02:42PM

Re: 504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

Maxim Dounin August 23, 2013 03:24PM

Re: 504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

Ben Johnson August 23, 2013 04:30PM

Re: 504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

Cool August 23, 2013 07:02PM

Re: 504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

itpp2012 August 24, 2013 05:29AM

Re: 504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

Ben Johnson August 26, 2013 10:40AM

RE: 504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

Lukas Tribus August 26, 2013 11:28AM

Re: 504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

Ben Johnson August 28, 2013 09:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 271
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready