|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48 filesize() function crashes PHP
Submitted: 1998-02-10 08:30 UTC Modified: 1998-02-24 13:39 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: sbedberg at ucdavis dot edu Assigned:
Status: Closed Package: Other
PHP Version: 3.0b4 OS: Windozer NT 4.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: sbedberg at ucdavis dot edu
New email:
PHP Version: OS:


 [1998-02-10 08:30 UTC] sbedberg at ucdavis dot edu

if (filesize($thisgif) > 2) {
   $typelist[$row['type']] = "<img src=\"$thisgif\"> $thisname<br>";
} else {
   $typelist[$row['type']] = "<b>($thistype)</b> $thisname<br>";


I was using filesize() as a file existence check for a .gif
file. Upon reaching the if... line, PHP hung in memory &
required an NT server restart (the NT Process Monitor
refused to kill it).

I haven't had a chance to check any of the other filesystem
routines under WinNT...might this be an artifact of the
Unix->Windopey NT port?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-02-24 13:39 UTC] shane
Fixed in b5
 [2020-02-20 09:17 UTC]
Automatic comment from SVN on behalf of nikic
Log: Fix \Ds\Map::values() example

Patch by enumag.

Closes php/doc-en#48.
 [2021-02-24 21:09 UTC]
Automatic comment on behalf of
Log: Merge pull request #48: Fix #80294: ssh2 wrappers not using an allocated resource segfault
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 07:01:29 2024 UTC