Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 port 443
*  Trying * connected
* Connected to ( 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:

Any idea what might be going wrong?

Further info: CentOS 5.8(64) with Nginx 1.2.4

share|improve this question
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? – 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
up vote 0 down vote accepted

Solved it by upgrading to 5.4.8.

share|improve this answer

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.

share|improve this answer

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

share|improve this answer
This answer would be improved with a supporting reference like a bugzilla ticket/issue. – Bernie White Nov 29 '12 at 8:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.