I've been trying to enable my HTTPS/SSL (443) streams in PHP but no had success at all. My certs are properly installed and I can normally browse through the site using HTTPS, but phpinfo() tells that such streams are not installed, at least for PHP.

This is the actual error I'm having with php:

ssl://gateway.sandbox.push.apple.com:2195... Thu, 14 Mar 2013 19:44:40 +0100 ApnsPHP3893: ERROR: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195': Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?

I'm using:

  • 64bit SUSE Linux AMI from Amazon
  • Apache 2.2.12
  • PHP 5.2.14
  • MySQL working fine

Phpinfo() tells me:

additional .ini files parsed: /etc/php5/conf.d/ctype.ini, /etc/php5/conf.d/curl.ini, /etc/php5/conf.d/dom.ini, /etc/php5/conf.d/gd.ini, /etc/php5/conf.d/hash.ini, /etc/php5/conf.d/iconv.ini, /etc/php5/conf.d/json.ini, /etc/php5/conf.d/mbstring.ini, /etc/php5/conf.d/mysql.ini, /etc/php5/conf.d/mysqli.ini, /etc/php5/conf.d/openssl.ini, /etc/php5/conf.d/pcntl.ini, /etc/php5/conf.d/pdo.ini, /etc/php5/conf.d/pdo_mysql.ini, /etc/php5/conf.d/pdo_sqlite.ini, /etc/php5/conf.d/soap.ini, /etc/php5/conf.d/sqlite.ini, /etc/php5/conf.d/suhosin.ini, /etc/php5/conf.d/tokenizer.ini, /etc/php5/conf.d/xmlreader.ini, /etc/php5/conf.d/xmlwriter.ini, /etc/php5/conf.d/zip.ini

Registered PHP Streams: php, file, data, http, ftp
Registered Stream Socket Transports: tcp, udp, unix, udg

cURL support enabled
cURL Information libcurl/7.19.0 OpenSSL/0.9.8j zlib/1.2.3 libidn/1.10

Mod_ssl also shows under the loaded modules section and extension=openssl.so is properly set in php.ini as well.

Someone has told me to try php -i | grep 'Configure Command', which resulted in the following error:

php: error while loading shared libraries: libmm.so.14: cannot open shared object file: No such file or directory


The HTTP stream includes HTTPS as of PHP 4.3.0, it's not a separate stream in phpinfo(). http://www.php.net/manual/en/wrappers.http.php

  • Thanks. Why those streams don't show at my phpinfo() output and in fact they're not working. I can't connect SSL to other sites, it says the stream type is not available... Comparing to other servers, I understand that https, ssl and ftps should be at the Registered PHP Streams. – Issao Mar 15 '13 at 16:14
  • Are you trying to use ssl:// URLs? Use https://. – ceejayoz Mar 15 '13 at 16:16
  • The HTTPS stream is listed as "http", which covers HTTP and HTTPS. The FTPS stream is listed as "ftp", which covers FTP and FTPS. The doc I linked makes this pretty clear... – ceejayoz Mar 15 '13 at 16:18
  • I can browse my site using https without problems. I can also connect using ssh, just can't see the https, ssh php registered streams using phpinfo(). When I compare to other servers with the exact same configuration, they show those protocols available, hence the code I mentioned works in those different servers. – Issao Mar 15 '13 at 16:19
  • 1
    SSH requires a PECL extension and is used via ssh2://. php.net/manual/en/wrappers.ssh2.php ssl:// doesn't appear to exist. php.net/manual/en/wrappers.php Read the pages on supported protocols and wrappers I'm linking repeatedly to, please. You may want to use fsockopen. – ceejayoz Mar 15 '13 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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