Jump to content

Socket Question


Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/147103-socket-question/
Share on other sites

"(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)?

Link to comment
https://forums.phpfreaks.com/topic/147103-socket-question/#findComment-772306
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/147103-socket-question/#findComment-772313
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.