PHP Script causing recursive free() calls (?)

From: Date: Tue, 14 Aug 2001 04:15:47 +0000
Subject: PHP Script causing recursive free() calls (?)
Groups: php.general 
Request: Send a blank email to php-general+get-62559@lists.php.net to get a copy of this message
I was told this was a PHP problem, and to submit a bug report. I'm not too sure what such a bug report would look like, or even if this is a PHP problem. Below is the message I sent to an Apache list, could someone tell me whether my problem is crummy code, or an actual problem with PHP/Apache? Thanks Chris -----Original Message----- From: Chris Cameron [mailto:chris@upnix.com] Sent: Friday, August 10, 2001 12:40 PM To: apache-server@yahoogroups.com Subject: PHP Script causing recursive free() calls (?) I've got quite a problem with part of a PHP script I wrote causing Apache too fill up it's error logs with: httpd in free(): warning: chunk is already free. httpd in free(): warning: chunk is already free. httpd in malloc(): warning: recursive call. FATAL: emalloc(): Unable to allocate 256 bytes Each call of this script will put about 20 megs in my error log. My Apache setup is: Apache/1.3.20 (Unix) mod_ssl/2.8.4 OpenSSL/0.9.6b PHP/4.0.6 And my phpinfo page is at chris.upnix.com/index.php The part of my PHP script that's causing the problem (sorry about the wraping): /* If no errors, submit junk to database */ if(!isset($Error)) { for($i = 1; $i <= $Days; $i++) { /* Write to bookings first */ $QueryString = "INSERT INTO bookings VALUES(nextval('BID'), '$CompanyID', '" . $TimeSpan[$i] . "', '$TimeF', '$TimeT', '$PricePerUnit')"; $Query = pg_exec($Connect, $QueryString); $OID = pg_getlastoid($Query); /* Find the BID we were given */ $QueryString = "SELECT bid FROM bookings WHERE oid = '" . $OID . "'"; $Query = pg_exec($Connect, $QueryString); $Result = pg_fetch_array($Query, 0); $BID = $Result['bid']; /* Go through our therapists */ foreach($Therapists[$i] as $Key => $TherapistID) { $QueryString = "INSERT INTO bookedtherapist VALUES('" . $BID . "', '$TherapistID', '$TimeF', '$TimeT')"; pg_exec($Connect, $QueryString); } } /* Everything Should be done, send us off to schview.php */ header("Location: " . $BaseURL . "admin/schview.php"); exit; } I've tried rewriting little parts of this script, but haven't had any luck in stopping the errors. Also, I've recompiled everything twice now, which also didn't help. Any help would be appreciated. Thanks, Chris

« previous php.general (#62559) next »