got errstr: "25: Inappropriate ioctl for device" when open ssl....

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex Shi

    got errstr: "25: Inappropriate ioctl for device" when open ssl....

    Hello,

    I got an error message when trying following script:

    <?
    //......
    if (!$handle = fsockopen ("ssl://my.com", 443, $errno, $errstr, $timeout =
    30)) {
    print "$errno: $errstr\n";
    return -1; /* connection failed */
    }

    /* The my.com site WAS installed with a SSL certificate, and it works
    perfect
    if access from a browser with 'https://' prefix. */
    //......
    ?>

    The errstr said "25: Inappropriate ioctl for device".
    I'm using PHP 4.3.0, but not sure if properly compiled with OpenSSL support.
    How can I check out this? And, even compiled with OpenSSL, can it work
    properly for site installed with branded SSL certificate?

    Thanks in advance!

    Alex Shi

  • Alex Shi

    #2
    Re: got errstr: &quot;25: Inappropriate ioctl for device&quot; when open ssl....

    Although no body answer my post, I still like to share my luck on SSL
    connection:

    I tried the script on another server it works perfect. However, if check
    phpinfo both the servers have OpenSSL support enabled. I really have
    no idea what make the difference....

    Alex Shi

    [color=blue]
    > Hello,
    >
    > I got an error message when trying following script:
    >
    > <?
    > //......
    > if (!$handle = fsockopen ("ssl://my.com", 443, $errno, $errstr, $timeout =
    > 30)) {
    > print "$errno: $errstr\n";
    > return -1; /* connection failed */
    > }
    >
    > /* The my.com site WAS installed with a SSL certificate, and it works
    > perfect
    > if access from a browser with 'https://' prefix. */
    > //......
    > ?>
    >
    > The errstr said "25: Inappropriate ioctl for device".
    > I'm using PHP 4.3.0, but not sure if properly compiled with OpenSSL[/color]
    support.[color=blue]
    > How can I check out this? And, even compiled with OpenSSL, can it work
    > properly for site installed with branded SSL certificate?
    >
    > Thanks in advance!
    >
    > Alex Shi
    >[/color]

    Comment

    Working...