|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-06-06 05:11 UTC] jeffers at node0 dot net
[2001-06-06 13:01 UTC] sniper@php.net
[2001-06-14 17:03 UTC] sniper@php.net
[2001-07-22 13:02 UTC] andy@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 17:00:01 2025 UTC |
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