Curl to HTTPS stops working with Nginx + php-fpm

When I try to make a curl with https in nginx + php-fpm, I get the following error in 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 

Nginx also gave me a Gateway 502 answer.

Simple code:

 <?php $ch = curl_init('https://www.google.com/'); curl_exec($ch); 
+6
source share
2 answers

Quick answer: just try uninstalling and installing php.

Long answer:

I had the same problem. I spent all day to fix this. The same problem was discussed on this forum: 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, this is in Russian. Explanation / translation of it: you need:

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

I used the Mac and the following commands:

  • launchctl unload -w ~ / Library / LaunchAgents / homebrew.mxcl.php54.plist
  • brew remove php54
  • brew install --without-apache --with-fpm --with-mysql php54
  • launchctl load -w ~ / Library / LaunchAgents / homebrew.mxcl.php54.plist
+6
source

I had the same problem on macOS. For me, updating the brew service fixed the problem.

 brew update brew upgrade --cleanup 

There may have been some inconsistency between the extensions. After the update, everything works correctly.

+1
source

Source: https://habr.com/ru/post/974066/


All Articles