Heim > Fragen und Antworten > Hauptteil
用php curl请求https的url出现502错误,请求帮忙解决。
PHP版本:5.6.7
Nginx版本:1.8.0
代码如下:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.baidu.com');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_exec($ch);
php-fpm日志:
[28-Jun-2015 04:04:20] NOTICE: [pool www] child 21701 started
[28-Jun-2015 04:07:33] WARNING: [pool www] child 21692 exited on signal 11 (SIGSEGV) after 222.256700 seconds from start
[28-Jun-2015 04:07:33] NOTICE: [pool www] child 21735 started