[PHP] php.ini and cli

2009-07-13 Thread Ashley Sheridan
Hi All,

Just a quick question. When I make changes in the php.ini, to take effect, I 
need to restart the Apache (or other web server) service. What happens with 
PHP CLI? Is the php.ini parsed each time the script is called, or is there 
something specific which needs resetting? The machine that the PHP CLI is 
running on is a Windows machine with no web server.
-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php.ini and cli

2009-07-13 Thread Eddie Drapkin
On Mon, Jul 13, 2009 at 4:48 AM, Ashley
Sheridana...@ashleysheridan.co.uk wrote:
 Hi All,

 Just a quick question. When I make changes in the php.ini, to take effect, I
 need to restart the Apache (or other web server) service. What happens with
 PHP CLI? Is the php.ini parsed each time the script is called, or is there
 something specific which needs resetting? The machine that the PHP CLI is
 running on is a Windows machine with no web server.
 --
 Thanks,
 Ash
 http://www.ashleysheridan.co.uk

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




The CLI binary reads and parses php.ini on every initialization.

Try something like

?php

echo $foo
?
And then set error_reporting (in php.ini) to E_ALL and see your
warning, then set it to 0 and see nothing.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php.ini and cli

2009-07-13 Thread Stuart
2009/7/13 Ashley Sheridan a...@ashleysheridan.co.uk:
 Just a quick question. When I make changes in the php.ini, to take effect, I
 need to restart the Apache (or other web server) service. What happens with
 PHP CLI? Is the php.ini parsed each time the script is called, or is there
 something specific which needs resetting? The machine that the PHP CLI is
 running on is a Windows machine with no web server.

The php.ini file is read whenever a PHP process is started, so in the
case of the CLI binary that's whenever it's run from the command line.
Long-running scripts will need to be restarted for them to see any
changes.

-Stuart

-- 
http://stut.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php.ini and cli

2009-07-13 Thread Ashley Sheridan
On Monday 13 July 2009 10:07:24 Stuart wrote:
 2009/7/13 Ashley Sheridan a...@ashleysheridan.co.uk:
  Just a quick question. When I make changes in the php.ini, to take
  effect, I need to restart the Apache (or other web server) service. What
  happens with PHP CLI? Is the php.ini parsed each time the script is
  called, or is there something specific which needs resetting? The machine
  that the PHP CLI is running on is a Windows machine with no web server.

 The php.ini file is read whenever a PHP process is started, so in the
 case of the CLI binary that's whenever it's run from the command line.
 Long-running scripts will need to be restarted for them to see any
 changes.

 -Stuart

 --
 http://stut.net/

Cool. The script I'm running is just scanning a directory structure for new 
files, so it's not a long-running one. I just needed to add some email 
functionality to it, and had to make some SMTP changes in the php.ini.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php