Hello,i'm currently working on Windows 2008 R2. I've installed PHP 5.6.6 and Python 2.7.9.I have PHP script, a simple one, that follow :
<?php$output="";$retval="";$array = array();if ( isset($_GET["message"]) ){ $msg = $_GET["message"];}$cmd = "deploy_to_server.py " . $msg;$result = exec($cmd,$output,$retval);if ( $retval == 1 ){ $array['success'] = FALSE; $array['result'] = $result;}else{ $array['success'] = TRUE; $array['result'] = $result;}echo json_encode($array);?>
Python script "deploy_to_server.py" copy files with name contained in "message". These files can be voluminous (1Go maximum).During first execution of my script, i had this error :"PHP Fatal error: Maximum execution time of 30 seconds exceeded in deploy_to_server.py ..."Simple to fix it by changing parameter in php.ini file :- max_execution_time = 300- max_input_time = 300Now timeout error is corrected. But i don't have python script return ($result).
But if copy takes less than 30s, i've got it. At 32s, no.
Note that in all cases (good copy, bad copy), execution return value $retval is good.
And python script is well executed.I tried to change execution time in script : ini_set('max_execution_time', 0); or set_time_limit();
But nothing change.
Do you know where is my problem ?
Is there an other configuration file to modify ? (PHP or IIS7)
Thanks for your help.
Sylvain