php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31 file read times out
Submitted: 1998-02-03 09:26 UTC Modified: 1998-02-03 11:27 UTC
From: dhancock at arinc dot com Assigned:
Status: Closed Package: Performance problem
PHP Version: 3.0b4 OS: Windows NT 4.0
Private report: No CVE-ID: None
 [1998-02-03 09:26 UTC] dhancock at arinc dot com
The following script:

<?php
$maxline = 10000;
$file = fopen("foo.txt", "r");
while (!feof($file)) {
    if ($line = chop(fgets($file,$maxline))) {
        echo $line, "\n";
    }
}
?>

works fine on php3.0b3 for Win32, but on php3.0b4, I
get a 5-second delay, then a warning that php has timed
out.

This is with php3.0b4 as downloaded from php.net.  I'm not
modifying php3.ini in any way, and the only differences
between the ini files for the two versions is on the last
line (browsercap.ini).

My data file (foo.txt) looks like this (although it
shouldn't matter):

news,mailinfo,forums
calendar,library,forums

I'm definitely new to PHP, so feel free to point me
to any resource I need to understand this.  I really
think this looks like a bug, but I won't discount the
possibility that it's a PEBCAK (problem exists between
chair and keyboard).

Cheers!
--
David Hancock | dhancock@arinc.com

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-02-03 11:27 UTC] shane
This is fixed now.
 [2019-10-01 15:28 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=pftt2.git;a=commit;h=96366d10ce0ba4a8397e68a63f88de6b1864f683
Log: Fix #31: Cleanup assumes wrong Opcache base address filename
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 07:01:29 2024 UTC