fsockopen() for an SSL connection
Posted: Wed Apr 29, 2009 1:25 pm
I am running a dedicated server with Centos 5.3, WHM/Cpanel 11.24, Apache 2.0.63, PHP 5.2.8. I have spent about 12 hours trying to setup PHPMailer 5.0 to reach the GMail servers, but can't seem to get fsockopen to work with SSL.
To keep the discussion short, I believe I have narrowed the problem down to PHP not seeing SSL as a transport stream. To prove this, I have run the following command;
My results;
In my php.ini I have the following set;
extension=php_openssl.dll
In my phpinfo, these are all the SSL references;
Configure Command; --with-curl=/opt/curlssl/ --with-imap-ssl=/usr
Apache 2 Handler-Apache Version; mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5
Apache 2 Handler-Load Modules; mod_ssl
Apache Environment-Server_Software; mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5
curl-cURL Information; OpenSSL/0.9.8b
imap-SSL Support; enabled
PHP Variables-_SERVER["SERVER_SOFTWARE"]; mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5
My httpd.config is generated by WHM/Cpanel, but I could add code to it if that would help.
I would appreciate any help in getting PHP to list SSL as one of the recognized transport streams.
To keep the discussion short, I believe I have narrowed the problem down to PHP not seeing SSL as a transport stream. To prove this, I have run the following command;
Code: Select all
<?php
$xportlist = stream_get_transports();
print_r($xportlist);
?>Code: Select all
Array ( [0] => tcp [1] => udp [2] => unix [3] => udg )extension=php_openssl.dll
In my phpinfo, these are all the SSL references;
Configure Command; --with-curl=/opt/curlssl/ --with-imap-ssl=/usr
Apache 2 Handler-Apache Version; mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5
Apache 2 Handler-Load Modules; mod_ssl
Apache Environment-Server_Software; mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5
curl-cURL Information; OpenSSL/0.9.8b
imap-SSL Support; enabled
PHP Variables-_SERVER["SERVER_SOFTWARE"]; mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5
My httpd.config is generated by WHM/Cpanel, but I could add code to it if that would help.
I would appreciate any help in getting PHP to list SSL as one of the recognized transport streams.