Bug #11305 Updated: Apache child procs arbitrary segfault
| From: | andy@php.net | Date: | Sun, 22 Jul 2001 17:02:19 +0000 |
| Subject: | Bug #11305 Updated: Apache child procs arbitrary segfault | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-60633@lists.php.net to get a copy of this message | ||
ID: 11305
Updated by: andy
Reported By: jeffers@node0.net
Old Status: Feedback
Status: Closed
Bug Type: Scripting Engine problem
Operating System: Slack/Linux 2.2.17
PHP Version: 4.0.4pl1
New Comment:
no feedback for 35+ days.
Previous Comments:
------------------------------------------------------------------------
[2001-06-14 17:03:14] sniper@php.net
We're now at RC3..and soon RC4 so change that part in URL..
------------------------------------------------------------------------
[2001-06-06 13:01:08] sniper@php.net
Does this happen with PHP 4.0.6RC2 from
http://www.php.net/~andi/php-4.0.6RC2.tar.gz
and if it does, please include a GDB backtrace of the crash.
--Jani
------------------------------------------------------------------------
[2001-06-06 05:11:13] jeffers@node0.net
instead of:
<pre>it also shows this error on sites that display
fine.</pre>
i should have said it also shows this error on RECORDS that display fine
thanks in advance....
------------------------------------------------------------------------
[2001-06-06 02:40:35] jeffers@node0.net
Howdy. I and having a prob with a function in a php script. It crashes at random points and only
with ceartain records, but i can't figure out what the diffrence is between functional and non
functional records. It just started doing this after upgrading from php 4.0.1/apache 1.3.12 to php
4.0.4pl1/apache 1.3.19.
php configure:
./configure --with-mysql --with-apache=../apache_1.3.19 --enable-track-vars
--with-tiff-dir=/usr/local --with-jpeg-dir=/usr/local --with-pdflib --with-zlib-dir=/usr/local
--with-png-dir=/usr/local --with-gd --enable-debug
apache config.status:
./configure \
"--with-layout=Apache" \
"--prefix=/usr/local/apache" \
"--activate-module=src/modules/php4/libphp4.a" \
"--enable-module=ssl" \
"--enable-module=rewrite"
below is the snippit i've tracked it down to... this is the only code on the site i've
found that causes the error.
function fdate($dateid) {
global $db, $tablebody;
if($GLOBALS[PHP_AUTH_USER] == 'admin') { print "1"; }
$result = mysql_query("SELECT date_value, date_text, date_checked, checklist" .
" FROM date_data WHERE dateid = $dateid", $db);
if($GLOBALS[PHP_AUTH_USER] == 'admin') { print "2"; }
$date = mysql_fetch_array($result);
if($GLOBALS[PHP_AUTH_USER] == 'admin') { print "3"; }
if ($result) {mysql_free_result($result);}
if ($date[date_value] == '' || $date[date_value] == '0000-00-00') { $tdate =
$date[date_text]; }
else {
list($yr, $mnth, $dy) = split("-", $date[date_value]);
$tdate = date("m\/d\/y", mktime(0, 0, 0, $mnth, $dy, $yr));
}
if($GLOBALS[PHP_AUTH_USER] == 'admin') { print "4"; }
if ($date[date_checked]) { $ndate = '*' . $tdate; $bg =
"bgcolor='$tablebody' "; }
if($GLOBALS[PHP_AUTH_USER] == 'admin') { print "5"; }
print("<td ${bg}align='center'> <font
class='vsmall'>$ndate</font></td>\n");
}
note the print 1,2 etc ... it crashes at random places too. (sometimes before one, and at all points
in between it seems. other times it works fine )
below is what was in apache's error_log. it also shows this error on sites that display fine.
[Tue Jun 5 17:27:03 2001] Script: '/usr/local/web/search.html'
---------------------------------------
zend_execute_API.c(261) : Block 0x08426128 status:
zend_variables.c(62) : Actual location (location was relayed)
Beginning: OK (allocated on datetime.c:307, 7 bytes)
End: Overflown (magic=0x2A8FCC00 instead of 0x2A8FCC84)
1 byte(s) overflown
---------------------------------------
datetime.c(307) : Freeing 0x0842614C (7 bytes),
script=/usr/local/web/search.html Last leak repeated 15 times
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=11305&edit=1