php - valid memory limit test -


i´m having trouble crashing ion-cube module. module imports csv data our database, if csv file large (15+m) result internal server error.

the support told me server not have enough ram run module. server has 1gb ram built in wrote simple test script check if ini_set works.

<pre> <?php  function tryalloc($megabyte){     echo "try allocating {$megabyte} megabyte...";     $dummy = str_repeat("-",1048576*$megabyte);     echo "pass.";     echo "usage: " . memory_get_usage(true)/1048576;      echo " peak: " . memory_get_peak_usage(true)/1048576;     echo "\n"; }    for($i=10;$i<1000;$i+=50){     $limit = $i.'m';     ini_set('memory_limit', $limit);      echo "set memory_limit {$limit}\n";      echo "memory limit ". ini_get("memory_limit")."\n";     tryalloc($i-10); }  ?> </pre> 

this runs without problems. there major flaws in test? having lots of trouble module , support keeps telling problem our server. -.-

ps: no can not access php.ini. no can not use .htaccess set memory limit. no have no way edit fix/debug module.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -