Re: php cli memory leak error

From: Date: Tue, 17 Feb 2009 19:08:27 +0000
Subject: Re: php cli memory leak error
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-288462@lists.php.net to get a copy of this message
Thodoris wrote: > >> Thodoris wrote: >> >>> Hi gang, >>> I am trying to run a simple PHP script using the cli and I get a >>> weird memory leak error. The script goes like this: >>> >>> #! /usr/local/bin/php >>> <?php >>> // Get command line options >>> $options = getopt("f:d:o:"); >>> >>> // Print them out >>> print_r($options); >>> >>> // Clear the array >>> unset($options); >>> ?> >>> >>> The problem is that when I run the script I get this error: >>> Script: './bcom.php' >>> /usr/ports/lang/php5/work/php-5.2.8/main/main.c(2015) : Freeing >>> 0x2871F2A8 (43 bytes), script=./bcom.php >>> === Total 1 memory leaks detected === >>> >>> This is hosted on a FreeBSD 7 machine with: >>> PHP 5.2.8 with Suhosin-Patch 0.9.6.3 (cli) >>> >>> Anyone knows what is happening ?? >>> I have to mention that the array is printed as expected. >>> >>> >> >> how are you call it? What arguments are you passing? etc... >> >> Show us your command line params... >> >> > > I am calling it from the command line like this: > > ./bcom.php -f test -d test -o test > > :-) > > But it really doesn't matter because it seems to leak even when calling > it without passing options. > seems to work fine here. What are your php.ini (memory related) settings? run: /usr/local/bin/php --ini and get the location of the php.ini file that is getting used. Check our the memory settings in that file. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare

« previous php.general (#288462) next »