ndjustin20 Posted February 27, 2009 Share Posted February 27, 2009 PHP Version 5.2.5 Redhat Linux WHM Cpanel I am receiving this error Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) When I use this code: $posturl = "ssl://" . $host; $header = "Host: $host\r\n"; $header .= "User-Agent: PHP Script\r\n"; $header .= "Content-Type: text/xml\r\n"; $header .= "Content-Length: ".strlen($content)."\r\n"; $header .= "Connection: close\r\n\r\n"; $fp = fsockopen($posturl, 443, $errno, $errstr, 30); Any help is appreciated, Justin Quote Link to comment https://forums.phpfreaks.com/topic/147103-socket-question/ Share on other sites More sharing options...
corbin Posted February 27, 2009 Share Posted February 27, 2009 "(Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)" PHP was most likely compiled without OpenSSL (hence no SSL support). Did you install PHP by compiling it your self or through yum (or what ever RH's name for yum is)? Quote Link to comment https://forums.phpfreaks.com/topic/147103-socket-question/#findComment-772306 Share on other sites More sharing options...
ndjustin20 Posted February 27, 2009 Author Share Posted February 27, 2009 Ok I didn't compile the PHP so I'm not really certain. How do I add ssl support at this point? Quote Link to comment https://forums.phpfreaks.com/topic/147103-socket-question/#findComment-772310 Share on other sites More sharing options...
corbin Posted February 27, 2009 Share Posted February 27, 2009 Hrmmm I don't know if it's possible through yum (I would assume it is). If you compiled it your self, you would have to tell PHP where OpenSSL is. I suggest doing it through yum though. Maybe: yum find "php ssl" Would work. Let me get on my Fedora Core box, and I'll see if I can find it. Quote Link to comment https://forums.phpfreaks.com/topic/147103-socket-question/#findComment-772313 Share on other sites More sharing options...
ndjustin20 Posted February 27, 2009 Author Share Posted February 27, 2009 Here is the link to the phpinfo file: http://freedomthinking.com/phpinfo.php Quote Link to comment https://forums.phpfreaks.com/topic/147103-socket-question/#findComment-772315 Share on other sites More sharing options...
corbin Posted February 27, 2009 Share Posted February 27, 2009 Do you have SSH access to your server? If so, try doing: yum install php-openssl Or up2date install php-openssl Quote Link to comment https://forums.phpfreaks.com/topic/147103-socket-question/#findComment-772318 Share on other sites More sharing options...
ndjustin20 Posted February 27, 2009 Author Share Posted February 27, 2009 Used yum install php-openssl and it seemed to work and I now show ssl enabled though I am still receiving the same error Quote Link to comment https://forums.phpfreaks.com/topic/147103-socket-question/#findComment-772329 Share on other sites More sharing options...
corbin Posted February 27, 2009 Share Posted February 27, 2009 Hrmmmmm..... I just realized something. Try https:// instead of ssl:// Quote Link to comment https://forums.phpfreaks.com/topic/147103-socket-question/#findComment-772330 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.