Re: [PHP] php cli question

2010-09-15 Thread J Ravi Menon
Thanks Bostjan for the suggestion. I did raise the issue and here is the reply: http://news.php.net/php.internals/49672 Thx, Ravi On Wed, Sep 15, 2010 at 2:38 AM, Bostjan Skufca wrote: > Here are the results I got when question of migration from apache to nginx > was brought up: > http://blog.

Re: [PHP] php cli question

2010-09-15 Thread Bostjan Skufca
Here are the results I got when question of migration from apache to nginx was brought up: http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/ (BTW there is some FPM in main PHP distribution now) As for resource management, I recommend looking at php sources (Zend/zend_alloca.c

Re: [PHP] php cli question

2010-09-14 Thread J Ravi Menon
On Tue, Sep 14, 2010 at 1:15 PM, Per Jessen wrote: > J Ravi Menon wrote: > >> On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen wrote: >>> J Ravi Menon wrote: >>> Few questions: 1) Does opcode cache really matter in such cli-based daemons? As 'SomeClass' is instantiated at every lo

Re: [PHP] php cli question

2010-09-14 Thread Nathan Rixham
Per Jessen wrote: J Ravi Menon wrote: 2) What about garbage collection? In a standard apache-mod-php setup, we rely on the end of a request-cycle to free up resources - close file descriptiors, free up memory etc.. I am assuming in the aforesaid standalone daemon case, we would have to do this m

Re: [PHP] php cli question

2010-09-14 Thread Per Jessen
J Ravi Menon wrote: > On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen wrote: >> J Ravi Menon wrote: >> >>> Few questions: >>> >>> 1) Does opcode cache really matter in such cli-based daemons? As >>> 'SomeClass' is instantiated at every loop, I am assuming it is only >>> compiled once as it has alrea

Re: [PHP] php cli question

2010-09-14 Thread J Ravi Menon
On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen wrote: > J Ravi Menon wrote: > >> Few questions: >> >> 1) Does opcode cache really matter in such cli-based daemons? As >> 'SomeClass' is instantiated at every loop, I am assuming it is only >> compiled once as it has already been 'seen'. > > Yup. Just

Re: [PHP] php cli question

2010-09-14 Thread Per Jessen
J Ravi Menon wrote: > Few questions: > > 1) Does opcode cache really matter in such cli-based daemons? As > 'SomeClass' is instantiated at every loop, I am assuming it is only > compiled once as it has already been 'seen'. Yup. > 2) What about garbage collection? In a standard apache-mod-php se

[PHP] Re: php cli question

2010-09-13 Thread J Ravi Menon
On Sat, Sep 11, 2010 at 8:50 PM, Shawn McKenzie wrote: > On 09/10/2010 11:13 AM, J Ravi Menon wrote: >> Hi, >> >> I have some basic questions on running php  (5.2.x series on Linux >> 2.6) as a standalone daemon using posix methods (fork() etc..): >> >> #!/usr/bin/php >> > >> require_once ('somecl

[PHP] Re: php cli question

2010-09-11 Thread Shawn McKenzie
On 09/10/2010 11:13 AM, J Ravi Menon wrote: > Hi, > > I have some basic questions on running php (5.2.x series on Linux > 2.6) as a standalone daemon using posix methods (fork() etc..): > > #!/usr/bin/php > > require_once ('someclass.php'); > > // do some initializations > . > > // main 'for

[PHP] php cli question

2010-09-10 Thread J Ravi Menon
Hi, I have some basic questions on running php (5.2.x series on Linux 2.6) as a standalone daemon using posix methods (fork() etc..): #!/usr/bin/php doSomething() } // shutdown logic. The 'someclass.php' in turn will include other files (via require_once). The above file will be executed dir

RE: [PHP] CLI question

2003-12-18 Thread Ford, Mike [LSS]
On 18 December 2003 14:48, Rodney Green wrote: > Ford, Mike [LSS] wrote: > > > Shouldn't that be *don't* use output buffering and...? The > flush() function has nothing to do with output buffering, and > if output buffering is on you will need ob_flush() as well. > > > > Another (and probably b

Re: [PHP] CLI question

2003-12-18 Thread Rodney Green
Ford, Mike [LSS] wrote: Shouldn't that be *don't* use output buffering and...? The flush() function has nothing to do with output buffering, and if output buffering is on you will need ob_flush() as well. Another (and probably better) solution is to create a php-cli.ini file, which will be picke

RE: [PHP] CLI question

2003-12-18 Thread Ford, Mike [LSS]
On 17 December 2003 21:33, Jay Blanchard wrote: > [snip] > I'm using the CLI version 4.3.4 on Windows XP Pro. The script I'm > writing has only a couple of functions, a couple of "if" conditionals > and a "while" loop. At the very top of the script I have an echo > statement with a message I want

RE: [PHP] CLI question

2003-12-17 Thread Jay Blanchard
[snip] I'm using the CLI version 4.3.4 on Windows XP Pro. The script I'm writing has only a couple of functions, a couple of "if" conditionals and a "while" loop. At the very top of the script I have an echo statement with a message I want printed to the console window. The problem is that it's

[PHP] CLI question

2003-12-17 Thread Rodney Green
I'm using the CLI version 4.3.4 on Windows XP Pro. The script I'm writing has only a couple of functions, a couple of "if" conditionals and a "while" loop. At the very top of the script I have an echo statement with a message I want printed to the console window. The problem is that it's not ec

Re: [PHP] PHP CLI question

2003-06-06 Thread Monte Ohrt
anual/en/function.ini-set.php > > > > > > > > > > * Cal Evans > > > > > * http://www.christianperformer.com > > > > > * Stay plugged into your audience > > > > > * The measure of a programmer is not the number of lines of

Re: [PHP] PHP CLI question

2003-06-06 Thread Mark
not the number of lines of > code he writes > > > > but the number of lines he does not have to write. > > > > * > > > > > > > > - Original Message - > > > > From: "Monte Ohrt" <[EMAIL PROTECTED]> > > > &

Re: [PHP] PHP CLI question

2003-06-06 Thread Jason Wong
On Friday 06 June 2003 01:43, Monte Ohrt wrote: > I know it can be altered with a command-line switch, but it is the > default that I want to change. I don't want to have to remember to set > the -c flag everytime, or go back and change all my existing scripts. You can run separate ./configure co

Re: [PHP] PHP CLI question

2003-06-06 Thread Monte Ohrt
not have to write. > > > * > > > > > > ----- Original Message - > > > From: "Monte Ohrt" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Cc: <[EMAIL PROTECTED]> > > > Sent: Thursday, June 05, 2003 9:22

Re: [PHP] PHP CLI question

2003-06-06 Thread Marek Kilimajer
he writes but the number of lines he does not have to write. * - Original Message - From: "Monte Ohrt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 9:22 AM Subject: [PHP] PHP CLI question Hi, A coupl

Re: [PHP] PHP CLI question

2003-06-06 Thread Adam Voigt
te Ohrt" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]> > > Sent: Thursday, June 05, 2003 9:22 AM > > Subject: [PHP] PHP CLI question > > > > > > > Hi, > > > > > > A couple of qu

Re: [PHP] PHP CLI question

2003-06-06 Thread Monte Ohrt
PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Thursday, June 05, 2003 9:22 AM > Subject: [PHP] PHP CLI question > > > > Hi, > > > > A couple of questions: > > > > 1) Is there a way to make the CLI version of PHP ig

Re: [PHP] PHP CLI question

2003-06-06 Thread Cal Evans
: "Monte Ohrt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 9:22 AM Subject: [PHP] PHP CLI question > Hi, > > A couple of questions: > > 1) Is there a way to make the CLI version of PHP ignore certain sett

[PHP] PHP CLI question

2003-06-06 Thread Monte Ohrt
Hi, A couple of questions: 1) Is there a way to make the CLI version of PHP ignore certain settings in the php.ini file? For instance, I don't want the ioncube accelerator invoked when using PHP from the command line. My current work around is to use two separate init files, php.ini and php-cli.i