I want to run a .php file via terminal (I have CentOS), so I want to know is there any limitation in execution time when I run the .php files with terminal, and not Apache?
3 Answers
Time limit should be the same. See max_execution_time in your php.ini. You can force it with set_time_limit(90) in your php code for example.
8 Comments
jadkik94
Doesn't Apache also enforce its own limit too?
Afshin Mehrabani
So, I couldn't find
time_limit in my php.ini, but max_execution_time is 30.Bogdan Burym
Yes, that's it. Change it or force with
set_time_limit(n)Bogdan Burym
@jadkik94 that's other thing.. That's Apache's timeout value.. It usually does not make problems.
Afshin Mehrabani
Just a silly thing! Now, it's about 12 minutes that I've run the script with
sudo php -f index.php and it's working now! Is this a unusual behavior? |
max_execution_timeis30.