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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.