#36445 [Asn->Csd]: Cannot enable encryption for stream server

From: Date: Sat, 19 May 2007 18:47:53 +0000
Subject: #36445 [Asn->Csd]: Cannot enable encryption for stream server
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-112860@lists.php.net to get a copy of this message
ID: 36445 User updated by: Jacek at veo dot pl Reported By: Jacek at veo dot pl -Status: Assigned +Status: Closed Bug Type: Sockets related -Operating System: SuSE Linux 9.1 +Operating System: Ubuntu 7.04 -PHP Version: 5.1.4 +PHP Version: 5.2.2 Assigned To: wez New Comment: Closing - anything works now (self-compiled PHP 5.2.2, OpenSSL 0.9.8c included to Ubuntu 7.04). Previous Comments: ------------------------------------------------------------------------ [2006-07-29 13:49:16] shopping at jth dot net See http://bugs.mysql.com/bug.php?id=21337 and related bugs ------------------------------------------------------------------------ [2006-07-28 22:53:47] shopping at jth dot net Server Version: Apache/2.2.0 (Fedora) mod_ssl/2.2.0 OpenSSL/0.9.8a mod_cntr/2.5.6 PHP/5.1.4 mod_perl/2.0.2 Perl/v5.8.8 $url = "https://....."; URL working fine in browser $fd = fopen($url, "r"); result fopen() [<a href='function.fopen'>function.fopen</a>]: SSL operation failed with code 114. OpenSSL Error messages: error:00000000:lib(0):func(0):reason(0) in ..... fopen() [<a href='function.fopen'>function.fopen</a>]: Failed to enable crypto in ..... ------------------------------------------------------------------------ [2006-07-26 08:49:54] magicaltux at gmail dot com I'm working on a PHP-based SMTP server, and I also have problems with STARTTLS. The full sourcecode can be fetched from: http://ookoo.org/svn/pinetd/ The STARTTLS function does *not* work. Warning: stream_socket_enable_crypto(): SSL operation failed with code 111. OpenSSL Error messages: error:00000000:lib(0):func(0):reason(0) in /usr/local/pinetd/daemon/25.php on line 373 ------------------------------------------------------------------------ [2006-07-24 18:58:32] gladyston at eacnet dot com dot br --> Apache 2.2 --> PHP Version 5.1.4 --> Linux 2.6.8-2-386 Aug 16 12:46:35 UTC 2005 i686 GNU/Linux <?php $url="https://shopline.itau.com.br/shopline/consulta.asp?DC=N183Z175F213E11E234B109E158C173O228K60Y165W217L103M205X7D136G92Q103R208F14E7W147L40Q103G244F243W216Z177K39S36F154S121D205D155A136V"; $handle = fopen($url, "r"); ?> Warning: fopen() [function.fopen]: SSL operation failed with code 114. OpenSSL Error messages: error:00000000:lib(0):func(0):reason(0) in /home/gladyston/webservice/t2.php on line 3 Warning: fopen() [function.fopen]: Failed to enable crypto in /home/gladyston/webservice/t2.php on line 3 Warning: fopen(https://shopline.itau.com.br/shopline/consulta.asp?DC=N183Z175F213E11E234B109E158C173O228K60Y165W217L103M205X7D136G92Q103R208F14E7W147L40Q103G244F243W216Z177K39S36F154S121D205D155A136V) [function.fopen]: failed to open stream: Bad file descriptor in /home/gladyston/webservice/t2.php on line 3 Ass, Gladyston Batista Belo Horizonte - Brazil ------------------------------------------------------------------------ [2006-06-01 07:35:01] Jacek at veo dot pl PHP 5.1.4 + OpenSSL 0.9.8b: ======== SERVER ======== serwer:/tls # php tls-server.php 1: STARTTLS Warning: stream_socket_enable_crypto(): Unable to set private key file `./server.pem' in /tls/tls-server.php on line 30 Warning: stream_socket_enable_crypto(): failed to create an SSL handle in /tls/tls-server.php on line 30 Error (if any): 2: YUFE@40Tz&#65533;F&#65533;~F1&#65533;V&#65533;hxK.985/32~}|yxwtsr Warning: stream_socket_accept(): accept failed: Connection timed out in /tls/tls-server.php on line 2 ======== CLIENT ======== serwer:/tls # php tls-client.php 1: 220 ESMTP 2: 250 STARTTLS Warning: stream_socket_enable_crypto(): SSL operation failed with code 114. OpenSSL Error messages: error:00000000:lib(0):func(0):reason(0) in /tls/tls-client.php on line 10 bool(false) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/36445 -- Edit this bug report at http://bugs.php.net/?id=36445&edit=1

« previous php.bugs (#112860) next »