Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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: http://i.imgur.com/ExAIf.png

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

3 Answers 3

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
1  
This answer would be improved with a supporting reference like a bugzilla ticket/issue. –  Bernie White Nov 29 '12 at 8:55

Your Answer

 
discard

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.