Lewis Wright schreef:
> 2009/2/19 Jochem Maas <[email protected]>:
>> Thodoris schreef:
>>>>
>>>> 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.
>>>>
>>>>
>>>>
>>>>
>>> Some general options:
>>> max_input_time = 60
>>> max_execution_time = 120
>>> memory_limit = 128M
>>>
>>> and the last one I have just noticed (that is why it reports the leak):
>>>
>>> report_memleaks = On
>>>
>>> In case I set this to Off it just stops bugging me. But is there a
>>> memory leak?
>> yes.
>>
>>> And if yes should I report this as a bug ?
>> if (
>>
>> 1. report_memleaks is a core php.ini setting (not suhosin) (I don't
>> recall)
>> 2. you still get the leak if you disable suhosin extension
>> 3. you can create a small reproduction script (seems you have one,
>> but I'd
>> check that it's the getopt() call that triggers the leak)
>> 4. you can show the mem leak in 5.2.9RC2 and/or php5.3dev
>> ) {
>> report_a_bug();
>> }
>>
>
> Syntax error, unexpected T_STRING :(
>
sorry. try this instead:
<?php
if (!function_exists('readline')) {
function readline( $prompt = '' )
{
echo $prompt;
return rtrim( fgets( STDIN ), "\n" );
}
}
function makeUserPerformSomeStuff($cmd)
{
$answer = null;
echo "compute this: $cmd\n\n";
while (!in_array(strtolower($answer), array('n','y')))
$answer = readline("did it compute? [y/n]: ");
return ($answer == 'y');
}
function report_a_bug()
{
return makeUserPerformSomeStuff("report a bug.");
}
if (makeUserPerformSomeStuff("
1. report_memleaks is a core php.ini setting (not suhosin) (I don't recall)
2. you still get the leak if you disable suhosin extension
3. you can create a small reproduction script (seems you have one, but I'd
check that it's the getopt() call that triggers the leak)
4. you can show the mem leak in 5.2.9RC2 and/or php5.3dev
")) {
report_a_bug();
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php