Terrabyte Posted September 10, 2012 Share Posted September 10, 2012 Hello, I'm running CentOS 6 with Parallel Plesk, I have set my max_execution_time in php.ini to 1800. however when i open info.php which contains the code: <?php phpinfo(); ?> I get that the max_execution_time is still 60, the old value. I tried restarting httpd but that didn't help. thank you Quote Link to comment https://forums.phpfreaks.com/topic/268217-php-max_execution_time/ Share on other sites More sharing options...
Terrabyte Posted September 10, 2012 Author Share Posted September 10, 2012 UPDATE: hello, i managed to change it successfully! now I have max_execution_time = 3600 and max_input_time = 3600 however when i run the script: <?php // current time echo date('h:i:s') . "\n"; // sleep for 10 seconds sleep(65); // wake up ! echo date('h:i:s') . "\n"; ?> it still gives me "Operation time out" after 60s Quote Link to comment https://forums.phpfreaks.com/topic/268217-php-max_execution_time/#findComment-1376710 Share on other sites More sharing options...
Mahngiel Posted September 12, 2012 Share Posted September 12, 2012 reset your web server Quote Link to comment https://forums.phpfreaks.com/topic/268217-php-max_execution_time/#findComment-1377379 Share on other sites More sharing options...
premiso Posted September 12, 2012 Share Posted September 12, 2012 Are you running this over the browser or via cli? There are two (or more) different php.ini files. Make sure you are changing the proper one. If you are using fpm, you will need to restart fpm. Finally, if you are calling this from the browser, the browser itself has a timeout limit, which is part of the reason why you should be doing this on the CLI to avoid the 3rd party stuff getting in the way. You can also use set_time_limit to set the exection time in the script itself which will override the php.ini setting. Quote Link to comment https://forums.phpfreaks.com/topic/268217-php-max_execution_time/#findComment-1377402 Share on other sites More sharing options...
Terrabyte Posted September 18, 2012 Author Share Posted September 18, 2012 hello premiso, thank you for your input, i tried set_time_limit() but it didn't work. I think maybe becasue sleep is a system call and isn't effected by that.. anyway im doing it using the FireFox browser which timeout is 300s. Im using phpinfo() to make sure that im changing the right php.ini and i think i am, i change both php.ini files just to make sure. i have FastCGI Quote Link to comment https://forums.phpfreaks.com/topic/268217-php-max_execution_time/#findComment-1378790 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.