0

Hey guys im running PHP 5.4.0 and I cannot cURL nor files_get_content() https connections.

Using curl in a PHP script shows:

[root@ns1]# /opt/php/bin/php -q test.php
* About to connect() to www.google.com port 443
*  Trying 74.125.225.210... * connected
* Connected to www.google.com (74.125.225.210) port 443
* successfully set certificate verify locations:
*  CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
Segmentation fault

Using file_get_contents() shows:

Warning: file_get_contents(): Unable to find the wrapper "https" - did
you forget to enable it when you configured PHP? in /test.php

OpenSSL and OpenSSL-devel are installed, and PHP is also configured with cURL support for SSL connections. See: https://i.stack.imgur.com/rCJNF.png

Any idea what might be going wrong?

Further info: CentOS 5.8(64) with Nginx 1.2.4

Mr.Boon
  • 1,471
  • 4
  • 24
  • 43
  • http://serverfault.com/questions/443363/php-crashing-during-oauth-scripts#comment479809_443363 – Michael Hampton Oct 29 '12 at 17:45
  • Yes 5.4.0 isn't the newest version, but it is the newest version via SVN. And because it is currently a LIVE production server, I prefer not to upgrade PHP entirely as it will mean serious downtime. – Mr.Boon Oct 29 '12 at 17:47
  • Have you followed through [this question for the file_get_contents() problem](http://stackoverflow.com/questions/5444249/unable-to-find-the-wrapper-https-did-you-forget-to-enable-it-when-you-config)? – Ladadadada Oct 29 '12 at 17:55
  • Yes, unfortunately that was a fix for windows, where simple ddl files could be added to the php.ini file. – Mr.Boon Oct 29 '12 at 18:06
  • Under Linux, the extensions still need to be loaded in your `php.ini` but the file extension is `.so` instead of `.dll`. – Ladadadada Oct 29 '12 at 18:18
  • Problem is, there is no php_openssl.so to be found. Not on my server, and also not online. I have looked everywhere. – Mr.Boon Oct 29 '12 at 18:41

3 Answers3

0

Solved it by upgrading to 5.4.8.

Mr.Boon
  • 1,471
  • 4
  • 24
  • 43
0

You might want to try compiling PHP from source using --with-openssl --with-curl (an your other requirements). It will guarantee that Curl and PHP are speaking the same versions.

gmck
  • 132
  • 1
0

Upgrading to 5.4.9 did it for me. There is apparently a bug with 5.4.4.