Reply
Is there any time limit for the execution of a php file from shell command line?
Old 04-19-2008, 01:43 AM Is there any time limit for the execution of a php file from shell command line?
yangyang's Avatar
Skilled Talker

Posts: 79
Location: kavoir.com
Trades: 0
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.
__________________
Learn news, deals and coupons of web hosting.

Get updated on daily scoop of web development tips and download database content.
yangyang is offline
Reply With Quote
View Public Profile Visit yangyang's homepage!
 
 
When You Register, These Ads Go Away!
Old 04-19-2008, 12:13 PM Re: Is there any time limit for the execution of a php file from shell command line?
addonchat's Avatar
Super Talker

Posts: 113
Name: Chris Duerr
Trades: 0
As of PHP 4.3 (at least) the maximum execution time default is not limited. Check out http://us3.php.net/features.commandline

Just to be on the safe side, I've always set a number of parameters using ini_set, including max_execution_time, memory_limit, mysql_connect_timeout, and a few more when calling php scripts from CLI/cron.
__________________
Chris Duerr
AddonChat Java Chat Software
http://www.addonchat.com/ - Affiliate Program
addonchat is offline
Reply With Quote
View Public Profile
 
Old 04-25-2008, 09:58 PM Re: Is there any time limit for the execution of a php file from shell command line?
yangyang's Avatar
Skilled Talker

Posts: 79
Location: kavoir.com
Trades: 0
Quote:
As of PHP 4.3 (at least) the maximum execution time default is not limited. Check out http://us3.php.net/features.commandline

Just to be on the safe side, I've always set a number of parameters using ini_set, including max_execution_time, memory_limit, mysql_connect_timeout, and a few more when calling php scripts from CLI/cron.
Nice info and suggestion. I tested it a little bit on my host and it turned out to be no time limit on console command.

ini_get is a neat one that will come handy in many situations, but is it also for this reason prohibitied by hosters?
__________________
Learn news, deals and coupons of web hosting.

Get updated on daily scoop of web development tips and download database content.
yangyang is offline
Reply With Quote
View Public Profile Visit yangyang's homepage!
 
Old 04-25-2008, 10:02 PM Re: Is there any time limit for the execution of a php file from shell command line?
addonchat's Avatar
Super Talker

Posts: 113
Name: Chris Duerr
Trades: 0
Quote:
Originally Posted by yangyang View Post
ini_get is a neat one that will come handy in many situations, but is it also for this reason prohibitied by hosters?
Good question. Honestly, I don't know -- I'm not in the hosting business and haven't used a shared server in nearly a decade -- back then I was doing most web apps in Perl or C/C++. I'm sure someone else here can give you an idea as to the why on that!
__________________
Chris Duerr
AddonChat Java Chat Software
http://www.addonchat.com/ - Affiliate Program
addonchat is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Is there any time limit for the execution of a php file from shell command line?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.21184 seconds with 13 queries