Dynadot — .com Transfer

Is there any time limit for the execution of a Php file from shell command line?

Spaceship Spaceship
Watch

ichsie

Account Closed
Impact
7
Web execution is bound with the execution time limit in php.ini and it causes 500 internal server error upon the prescribed end of the span.

My question is if the CLI, or Command Line Interface SAPI does the same thing with my script? I have a script that may very well run dozens of hours before it finishes its job.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
The "max_execution_time" (the php.ini directive you are speaking of) is over-ridden and set by default to to run from command-line with a value of "0" (unlimited time). However, if you are running this remotetly (as in a dedicated server via Putty or the like), your SSH connection may be broken before the script finishes execution, due to null/dead time. Make sure that, at least every minute or so (even if its just printing out a "."), that your script outputs back to the line, so you don't get disconnected.
 
0
•••
The "max_execution_time" (the php.ini directive you are speaking of) is over-ridden and set by default to to run from command-line with a value of "0" (unlimited time). However, if you are running this remotetly (as in a dedicated server via Putty or the like), your SSH connection may be broken before the script finishes execution, due to null/dead time. Make sure that, at least every minute or so (even if its just printing out a "."), that your script outputs back to the line, so you don't get disconnected.

Got ya. Thanks a lot for the tip. =) Also I can overwrite any php.ini directives with the -d switch of php.
 
0
•••
maximum said:
The "max_execution_time" (the php.ini directive you are speaking of) is over-ridden and set by default to to run from command-line with a value of "0" (unlimited time). However, if you are running this remotetly (as in a dedicated server via Putty or the like), your SSH connection may be broken before the script finishes execution, due to null/dead time. Make sure that, at least every minute or so (even if its just printing out a "."), that your script outputs back to the line, so you don't get disconnected.

Or you could just install screen and not worry about it.
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
Appraise.net

We're social

Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back