fsockopen to SSL address giving "no SSL support" error

skypanther

Exalted Code Master!
To implement an online payment script, I'm trying to connect via PHP to an https address using fsockopen. I get this error:

Warning: fsockopen() [function.fsockopen]: no SSL support in this build

Yet, when I use phpinfo() I see SSL support is installed and enabled for the domain. I found many similar posts on forums across the 'net, but few solutions. I haven't rewritten the code to use curl yet given that I see from the libcurl documentation that I'll need SSL support for it, too.

Is SSL not really supported? Suggestions?

Thanks,
Tim
 
Thanks for the suggestions. Stephen, you're correct in assuming this site is on a Windows server...wincf I think.

I tried switching the site to php 5. I get a different error:

fsockopen() [function.fsockopen]: unable to connect to ssl://site.example.com :443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)

This time, when I run phpinfo() SSL doesn't seem to be listed. Perhaps I need to update my php.ini? I'll submit a ticket for a current version.

Tim
 
The custom php.ini and enabling the openssl extension did the trick. Now, back to debugging my php!

Tim
 
Back
Top