Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13583 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6640 invoked by uid 1010); 28 Oct 2004 15:07:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 6565 invoked from network); 28 Oct 2004 15:07:06 -0000 Received: from unknown (HELO colo.lerdorf.com) (66.198.51.121) by pb1.pair.com with SMTP; 28 Oct 2004 15:07:06 -0000 Received: from DELL (c-24-6-200-247.client.comcast.net [24.6.200.247]) by colo.lerdorf.com (8.13.1/8.13.1/Debian-15) with ESMTP id i9SF75tv004471; Thu, 28 Oct 2004 08:07:05 -0700 Date: Thu, 28 Oct 2004 08:07:03 -0700 (Pacific Standard Time) To: Pascal dev cc: internals@lists.php.net In-Reply-To: <01d401c4bcec$0de7b810$0100a8c0@saintmaur> Message-ID: References: <01d401c4bcec$0de7b810$0100a8c0@saintmaur> X-X-Sender: rasmus@lerdorf.com MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] PHP extension module problem From: rasmus@php.net (Rasmus Lerdorf) On Thu, 28 Oct 2004, Pascal dev wrote: > I though about a lot of possibilities : > -problem with C global variable handling (I am not using ZTS), > -problem with Zend variables handling (the C functions are creating and updating zval parameters) > -problem with sessions (I tried files and mm with same result) > -bad configuration... Sounds more like some nasty memory handling problem to me. When running as a CGI your process starts up and shuts down completely for each request so the OS cleans everything up for you after each request even if you forget to free() malloc'ed memory. When running as an Apache module your code must be re-entrant and clean up after itself after each request. If you use PHP's emalloc/efree memory handling wrappers this is easy, but if you are doing your own mallocs perhaps you forgot to free and on each request you chew up more memory. Pop it through Valgrind and see what is happening. -Rasmus