Bug #1558: fgetc dies.
| From: | azi at lfx dot org | Date: | Thu, 17 Jun 1999 12:34:17 +0000 |
| Subject: | Bug #1558: fgetc dies. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-7053@lists.php.net to get a copy of this message | ||
From: azi@lfx.org
Operating system: FreeBSD bsd.bolted.net 3.2-RELEASE FreeBSD 3.2-RELEASE #0:
PHP version: 3.0.9
PHP Bug Type: Misbehaving function
Bug description: fgetc dies.
The code fragment below hangs until the script timeout on fgetc(). It's trying to make a POP3
connection, which should give an immediate "+OK dmt POP3 Server (Version 1.005l) ready at
<Thu Jun 17 06:26:25 1999> " line upon connecting. This script (and actually a
much, much more complicated version) run perfectly under Linux, but neither works in FreeBSD. Exact
same setup. Apache 1.3.6, PHP 3.0.9. --enable-track-vars --with-apache=../apache_1.3.6 --with-mysql
--without-pcre-regex
You can try executing this code at http://bsd.bolted.net/toast.php3. php3.ini can be
downloaded from http://bsd.bolted.net/php3.ini.
It'd kinda really really REAAALLY be helpful to get this fixed quick, we're bouncing the
connections around between a linux and BSD box as a quickfix, but the traffic's growing
exponentially thanks to the SQL database accesses..
I've also verified it's getting past the fsockopen.. It's that damn fgetc it's
locking on. fgets does the same thing.
<?
$fd = fsockopen ("lfx.org", 110);
if (!$fd) die ("Can't open socket!");
$char = fgetc ($fd);
echo "Got '$char' (expecting a +)";
?>