#23220 [NoF-Opn]: fgets() causes warning while reading data via SSL channel (HTTPS)

2004-01-11 Thread heino
 ID:   23220
 Updated by:   [EMAIL PROTECTED]
 Reported By:  storozhilov at mail dot ru
-Status:   No Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: FreeBSD 4.8
 PHP Version:  4-STABLE-200307070330
 Assigned To:  wez
 New Comment:

This bug is apparently still living; even in PHP 5.0b3...


Previous Comments:


[2004-01-08 06:14:58] a at anseljh dot com

Red Hat 9
PHP 4.3.4, Apache 2.0.48, OpenSSL 0.9.7c (built from source)

Also happens with either fread() or feof() on an SSL socket connection
opened with fsockopen ($request):

while (!feof($request)) $response .= fread($request, 4096);

This code works flawlessly on a non-SSL socket connection.



[2003-12-29 14:31:32] Roger dot Schweppe at cbsks dot com

I have been having the same problem with IIS 5.  So if you ever find a
solution I would be very happy to hear from you. 

Thanks,
Roger



[2003-12-23 14:02:46] pta at interkan dot net

Forgot to include this info:

PHP 4.3.4 (cli) (built: Dec  4 2003 11:17:45)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies



[2003-12-23 14:01:39] pta at interkan dot net

I've been experiencing the same problem with PHP 4.3.4 running on a
Linux Slackware/Apache server.  The problem did initially crop up
inside the PEAR Socket class which I'm trying to use to connect to
Authorize.Net's gateway.  Here's the exact message returned (with path
changes):

Warning: fread(): SSL: fatal protocol error in /path/to/Net/Socket.php
on line 243



[2003-12-12 20:59:12] tim at timcrider dot com

oh by the way. I am trying this with https:// as wez requested and am
reproducing the same error:

PHP 5.0.0b2 (cli) (built: Dec  7 2003 18:04:51)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v2.0.0-dev, Copyright (c) 1998-2003 Zend Technologies
with Turck MMCache v2.4.6, Copyright (c) 2002-2003 TurckSoft, St.
Petersburg, by Dmitry Stogov



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/23220

-- 
Edit this bug report at http://bugs.php.net/?id=23220edit=1


#23220 [NoF-Opn]: fgets() causes warning while reading data via SSL channel (HTTPS)

2003-07-07 Thread philip
 ID:   23220
 Updated by:   [EMAIL PROTECTED]
 Reported By:  storozhilov at mail dot ru
-Status:   No Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: FreeBSD 4.8
-PHP Version:  4.3.1
+PHP Version:  4-STABLE-200307070330
 New Comment:

Status-Open


Previous Comments:


[2003-07-07 00:48:32] severitt at ihug dot co dot nz

After experiencing this same bug with php 4.3.2 on FreeBSD 4.4, I came
searched here and found this bug report.
After reading the comment to try the latest stable version, I compiled
and installed php4-STABLE-200307070330.
 However the problem still remains. It appears that maybe feof() is not
detecting the eof properly, because if I read in less bytes than the
the size of the response, I don't get this warning.



[2003-04-21 09:23:00] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to Open. Thank you.





[2003-04-15 03:27:48] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

The stable snapshot has better SSL protocol handling and most likely
solves this problem.



[2003-04-15 01:52:09] storozhilov at mail dot ru

?php
  $fd = fsockopen(
'ssl://www.somehost.com',
443,
$errno,
$errstr,
30
  );
  fputs($fd, GET / HTTP/1.0\r\n\r\n);
  while (!feof($fd)) {
echo fgets($fd, 1024);
  );
?
After executing of this script following message appears:
Warning: fgets() [function.fgets]: SSL: fatal protocol error in
/blah/blah/blah/blah.php on line NN

PHP was configured with following arguments:
#!/bin/sh
./configure --with-apache=../apache_1.3.27rusPL30.17 --with-mod_charset
--with-pgsql=/usr/local/pgsql --with-mhash --with-sybase=/usr/local
--with-openssl




-- 
Edit this bug report at http://bugs.php.net/?id=23220edit=1