I am having trouble opening URLs with the ssl:// scheme. Detailing:

phpinfo(): http://pastie.org/2391404

Sample code:

$socket = @fsockopen("ssl://cgw.ubb.bg", 443, $errno, $errstr, 30);
if (!$socket) {
  $err = "$errstr ($errno) - " . $socket;
  echo "Unable to connect. $err";
} else {
  echo "Connected.";
  fclose($socket);
}

echo PHP_EOL;

What I get in response is this:

Unable to connect. (0) -

(Yes, I did try to connect with telnet/browser/etc., the host/port combo is not the problem.)

In other words, errno is 0, and no error message is provided.

When I put this in /opt/lampp/etc/php.ini:

extension="openssl.so"

I am getting this error:

Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/openssl.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/openssl.so: cannot open shared object file: No such file or directory in Unknown on line 0

Alas, there is indeed no openssl.so file in there.

My XAMPP platform is: i686-pc-linux-gnu.

My question is:

Can I "cheat" somehow by just downloading the proper file and be done with it? If not, how could I compile it from source and integrate it into XAMPP without ripping it apart?

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.