Page 1 of 1

Socket Question

Posted: Thu Feb 26, 2009 8:11 pm
by ndjustin20
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:

Code: Select all

 
$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

Re: Socket Question

Posted: Fri Feb 27, 2009 2:48 am
by Weirdan
Your php doesn't support ssl stream wrapper. Ask your hosting company if they can enable it for you.