Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

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

$
0
0
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

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>