php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11305 Apache child procs arbitrary segfault
Submitted: 2001-06-06 02:40 UTC Modified: 2001-07-22 13:02 UTC
From: jeffers at node0 dot net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.4pl1 OS: Slack/Linux 2.2.17
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jeffers at node0 dot net
New email:
PHP Version: OS:

 

 [2001-06-06 02:40 UTC] jeffers at node0 dot 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-06 05:11 UTC] jeffers at node0 dot 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 13:01 UTC] 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-14 17:03 UTC] sniper@php.net
We're now at RC3..and soon RC4 so change that part in URL..

 [2001-07-22 13:02 UTC] andy@php.net
no feedback for 35+ days.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 01 16:01:31 2024 UTC