I have a simple test php script:
[php]
eShop Tools <?php ini_set('display_errors',0); error_reporting(E_ERROR | E_WARNING | E_PARSE);$max_execution_time = ini_get(‘max_execution_time’);
ini_set(“max_execution_time”, 300);
file_put_contents(“log111.txt”,date(“Y-m-d H:i:s”)."=>begin while"."\r\n",FILE_APPEND);
$StartTime = date(“y-m-d h:i:s”);
while(true){
$EndTime = date(“y-m-d h:i:s”);
$TimeSpent = strtotime($EndTime)-strtotime($StartTime);
$i=0;
do{
$i++;
}while($i<100000);
if( $TimeSpent >120){
break;
}
}
file_put_contents(“log111.txt”, date(“Y-m-d H:i:s”)."=>before echo"."\r\n" ,FILE_APPEND);
ini_set(“max_execution_time”, $max_execution_time);
echo “Success”;
file_put_contents(“log111.txt”, date(“Y-m-d H:i:s”)."=>after echo"."\r\n" ,FILE_APPEND);
?>
2015-12-26 10:46:31=>begin while
2015-12-26 10:48:32=>before echo
2015-12-26 10:48:32=>after echo
bug the browser display nothing. I can see the php script is still loading in browser.
when I change " $TimeSpent >20" , it works well and display "Success " and the button html.
and when " $TimeSpent >120" , this script also can run well in my local server and some hosting web site, but can’t run in SiteGround web site, it just display nothing and show running there. SiteGround support didn’t know the reason.
Does anyone know what is the reason? I will very appreciate.