Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

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?
Banned

Posts: 81
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.
yangyang is offline
Reply With Quote
View Public Profile Visit yangyang's homepage!
 
 
Register now for full access!
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: 115
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

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
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?
Banned

Posts: 81
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?
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: 115
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

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
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.65132 seconds with 12 queries