Hey guys.  :)

I'm getting an error with PHP 5.1.6 that I've compiled against OpenSSL
0.9.8c...

Here's the code.  Pretty simple:

<?
$mysock = fsockopen("tls://smtp.gmail.com", 587, $errno, $errstr, 30);
?>

However, I get the following error:

----
Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error
messages:
error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number in
/root/test.php on line 2

Warning: fsockopen(): Failed to enable crypto in /root/test.php on line 2

Warning: fsockopen(): unable to connect to tls://smtp.gmail.com:587 (Unknown
error) in /root/test.php on line 2
----

I'm running on Debian 3.1 (Sarge), if that matters.

I configured OpenSSL as follows:

./config --prefix=/usr --openssldir=/usr/lib/ssl
make && make test && make install

And PHP as follows:

'./configure' \
'--with-apxs=/usr/sbin/apxs' \
'--with-jpeg-dir=/usr' \
'--with-png-dir=/usr' \
'--with-zlib-dir=/usr' \
'--with-curl=/usr/local/curl' \
'--with-gd' \
'--enable-ftp' \
'--enable-sockets' \
'--with-mysql=/usr/local' \
'--enable-track-vars' \
'--with-imap-ssl=/usr' \
'--with-kerberos' \
'--with-imap' \
'--with-openssl=/usr'
make && make install


Any ideas what could be causing this?  :)  I've searched for the answer and
went through every link I could find basically on Google...  I see that a
lot of people have had this problem, but I haven't seen a single solution.


Thanks in advance, guys!  It's really appreciated!
        Dave

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to