kran
kran

Reputation: 259

HTTPS requests with curl or file_get_contents cause php crashes

php on server has openssl extension enabled(can see in phpinfo() )

PHP Version 5.2.14

'./configure' '--prefix=/usr/local/webserver/php' '--with-config-file-path=/usr/local/webserver/php/etc' '--with-mysql=/usr/lib64/mysql' '--with-mysqli=/usr/bin/mysql_config' '--with-iconv-dir=/usr/local' '--with-freetype-dir' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr' '--enable-xml' '--disable-rpath' '--enable-discard-path' '--enable-safe-mode' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl' '--with-curlwrappers' '--enable-mbregex' '--enable-fastcgi' '--enable-fpm' '--enable-force-cgi-redirect' '--enable-mbstring' '--with-mcrypt' '--with-gd' '--enable-gd-native-ttf' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--with-ldap' '--with-ldap-sasl' '--with-xmlrpc' '--enable-zip' '--enable-soap'

php-fpm.log

Jun 18 10:03:08.882866 [WARNING] fpm_stdio_child_said(), line 167: child 8665 (pool default) said into stderr: ""

Jun 18 10:03:08.884945 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD

Jun 18 10:03:08.885008 [WARNING] fpm_children_bury(), line 215: child 8665 (pool default) exited on signal 11 SIGSEGV after 33.717855 seconds from start

Jun 18 10:03:08.885573 [NOTICE] fpm_children_make(), line 352: child 8689 (pool default) started

Jun 18 10:03:09.689830 [WARNING] fpm_stdio_child_said(), line 167: child 8606 (pool default) said into stderr: "[Mon Jun 18 10:03:09 2012" 225

Jun 18 10:03:09.690014 [WARNING] fpm_stdio_child_said(), line 167: child 8606 (pool default) said into stderr: "] [notice] EACCELERATOR(8606): PHP crashed on opline 130 of curl_exec() at xxx.php:383"

But when request via HTTPS, nginx return 502 (bad gate way) error.

How to find the reason ?

Upvotes: 1

Views: 1187

Answers (2)

Nate Yang
Nate Yang

Reputation: 1

This is libcurl problem.

Make sure libcurl with openssl support.

checking for SSL support in libcurl... yes
checking for openssl support in libcurl... yes

Upvotes: 0

user2991633
user2991633

Reputation: 1

I met a problem very like this a few days ago, my system is Linux CentOS6.2, Finally I use CentOS 5.6 , the problem resolved, I think the reason is system version and openSSL version didn't match,
My english is not very good, But hope it helpful for you

Upvotes: 0

Related Questions