Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Curl to HTTPS stop working with Nginx + php-fpm

Tags:

php

curl

When I try to do a curl with https in nginx+php-fpm I get the next error in the php-fpm.log

WARNING: [pool www] child 661 exited on signal 11 (SIGSEGV) after 64.104500 seconds from start
[20-Aug-2014 00:09:43] NOTICE: [pool www] child 670 started

Also the Nginx give me a 502 Gateway response.

The simple code :

<?php
$ch = curl_init('https://www.google.com/');
curl_exec($ch);
like image 835
eusoj Avatar asked Aug 20 '14 05:08

eusoj


2 Answers

Quick answer: Just try to remove and install php.

Long answer:

I had the same issue. I spent all day to fix it. In this forum was discussion about the same issue: http://phpclub.ru/talk/threads/php-fpm-%D0%B8-https-%D0%BA%D1%80%D0%B0%D0%B9%D0%BD%D0%B5-%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5-%D0%BF%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5.58742/

Unfortunately it is in Russian. Explanation/translation of it: you need to:

  • stop php-fpm
  • delete php
  • install php
  • List item

I have used Mac and next commands:

  • launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.php54.plist
  • brew uninstall php54
  • brew install --without-apache --with-fpm --with-mysql php54
  • launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php54.plist
like image 55
Anton Popov Avatar answered Nov 03 '22 00:11

Anton Popov


I had the same problem in macOS. For me upgrading brew services fixed the issue.

brew update
brew upgrade --cleanup

Perhaps there was some inconsistency between extensions. After upgrading everything works correct.

like image 1
kalya Avatar answered Nov 02 '22 23:11

kalya