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

6
  • 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, 2012 at 17:47
  • Have you followed through this question for the file_get_contents() problem?
    – Ladadadada
    Oct 29, 2012 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, 2012 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, 2012 at 18:18

3 Answers 3

0

Solved it by upgrading to 5.4.8.

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.

0

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

1
  • 1
    This answer would be improved with a supporting reference like a bugzilla ticket/issue. Nov 29, 2012 at 8:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .