LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Pre-sale questions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #33  
Old 12-15-2008, 06:46 AM
[QT]bender [QT]bender is offline
Member
 
Join Date: May 2008
Posts: 16
Hi guys. I think I need same patch too. We are having application that require memory limit higher than 256 MB and I have memory_limit set to 512, but scripts stop working at 256 MB of memory. I have used the following script to test this out:

PHP Code:
<?
$begin 
getmicrotime();

error_reporting(E_ALL);
$mem_lim=ini_get("memory_limit");
$num_iterations=$mem_lim-1;
// increase memory limit
#ini_set("memory_limit", "256M");
ini_set("max_execution_time""60");
echo 
"memory limit set to $mem_lim<br>";
echo 
"max_execution_time set to " ini_get("max_execution_time") . "<br>";
echo 
"Building very long string ... <br>";
flush();
$array = array();
for (
$i 1$i <= $num_iterations$i++) {
echo 
"Adding 1M data ... ";
add($array);
echo 
"[OK] Total: $i Mb<br>";
}
#echo "<br>[OK] Total: $i Mb<br>";
$end getmicrotime();
echo 
"Execution time: "; echo $end $begin;

function 
getmicrotime() // {{{
{
list(
$usec$sec) = explode(" ",microtime());
return ((float)
$usec + (float)$sec);
}


function 
add(&$array)
{
$array[] = $str str_repeat("*"1024*1024);
return 
$array;
}
?>
Look forward to hearing from you.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:54 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.