Bug #15665 Updated: readdir() crashes
| From: | pav at oook dot cz | Date: | Wed, 29 May 2002 22:21:10 +0000 |
| Subject: | Bug #15665 Updated: readdir() crashes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-8878@lists.php.net to get a copy of this message | ||
ID: 15665
Updated by: pav@oook.cz
Reported By: david@acz.org
Status: Open
Bug Type: Reproducible crash
Operating System: FreeBSD 4.4-STABLE
PHP Version: 4.1.1
New Comment:
I have very similar thing happening. Script is reading directory with
a
lot of image files, printing them in colors. The script crash as both
mod_php4 in apache and command-line. It crash every time at same
position, however it crash in different positions when called thru
apache and when run from command line. Relevant part of script:
$handle = opendir("/home/pav/images/fit");
while ($fajl = readdir($handle)) {
if ($fajl == "." || $fajl == "..") continue;
echo '<a href="wow.php3?showme='.$fajl.'" target="_blank"
style="color:
';
if ($rates[$fajl]) echo calclinkcolor($ratingy[$fajl]);
else echo calclinkcolor(-1);
echo '">'.$fajl."</a>\n";
}
closedir($handle);
backtrace
#0 0x2836aaed in readdir_r () from /usr/lib/libc.so.4
(gdb) bt
#0 0x2836aaed in readdir_r () from /usr/lib/libc.so.4
#1 0x8091935 in php_if_readdir ()
#2 0x80ed79c in execute ()
#3 0x80d9171 in zend_execute_scripts ()
#4 0x8062406 in php_execute_script ()
#5 0x8060288 in main ()
#6 0x805f629 in _start ()
PHP 4.2.1, Apache 1.3.24, FreeBSD 4.5-STABLE
Previous Comments:
------------------------------------------------------------------------
[2002-05-08 04:49:34] david@acz.org
I had the mkdir problem in 4.1.1 under FreeBSD, but it appears to be
fixed in 4.2.1RC2:
http://bugs.php.net/bug.php?id=17034
------------------------------------------------------------------------
[2002-05-08 04:35:09] jason@jase.org
Ok, ignore that :) Maybe its related?
------------------------------------------------------------------------
[2002-05-08 04:33:49] jason@jase.org
See:
http://bugs.php.net/bug.php?id=16905 (closed)
&&
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/37825
(patch)
Jason
------------------------------------------------------------------------
[2002-04-13 08:55:39] noemail@a.ml
forgon to tell you...
apache 1.3.22 and php4.1.1 (both from the ports collection)
------------------------------------------------------------------------
[2002-04-13 08:54:30] noemail@a.ml
I have the same problems with a script under freebsd4.5-release.
It just started crasching out of nothing. No change in the dirscancode,
no change on the server. Worked just fine before yesterday. The only
way to run the script now is to press the updatebutton in
internetexplorer several times quite quickly, it works when I do so (I
get about 5-6 httpds wotrking in the background).
This is so strange.
------------------------------------------------------------------------
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/15665
--
Edit this bug report at http://bugs.php.net/?id=15665&edit=1