Ahmad Asjad
Ahmad Asjad

Reputation: 823

ini_set for max_execution_time is not working

I'm using Command line of PHP with Yii Framework Command.

As I know on cli default value is 0

When I changed its value to 2 sec, it's giving 0 value that is success value as old value. I also checked value after changing

ini_set('max_execution_time', 2);

using

echo ini_get('max_execution_time');

it's giving correct value i.e. 2

I have put tracker for getting the total execution time after that code

$scriptStartTime = time();
.....
some code
.....
echo (time() - $scriptStartTime);

It gives more than 5 sec. Any Idea why it's not giving timeout error?

Upvotes: 1

Views: 2247

Answers (0)

Related Questions