ID: 16905
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Scripting Engine problem
Operating System: FreeBSD 4.5
PHP Version: 4.2.0
New Comment:
Yeah sorry! Commented bad bug. Sorry. This apply to bug #15665. Sorry
again.
Previous Comments:
------------------------------------------------------------------------
[2002-05-29 18:18:02] [EMAIL PROTECTED]
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
------------------------------------------------------------------------
[2002-05-07 08:23:06] [EMAIL PROTECTED]
Hi,
I've submitted a pr to the FreeBSD php port maintainer, including a
patch.
The patch can be downloaded from:
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/37825
Jason
------------------------------------------------------------------------
[2002-05-06 13:35:58] [EMAIL PROTECTED]
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/
fix was merged into 4.2 branch, so it should be included in 4.2.1. (we
were passing a pointer to a mode_t, which is a short on freebsd, and it
was being treated elsewhere as a pointer to a long. this is the fun
sort of bug that usually only shows up on non-debug builds.)
------------------------------------------------------------------------
[2002-05-06 11:37:39] [EMAIL PROTECTED]
Happens in 4.2.1RC1 as well. When compiled with --enable-debug, works
fine. When compiled with --disable-debug, it doesn't work
------------------------------------------------------------------------
[2002-05-02 06:04:48] [EMAIL PROTECTED]
Just to further confuse the issue. If I build the 4.3.0-DEV snaphost
(php4-200205020000) with --enable-debug then it behaves normally.
Jason
------------------------------------------------------------------------
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/16905
--
Edit this bug report at http://bugs.php.net/?id=16905&edit=1