Re: [PHP] CLI not obeying php.ini

2009-02-05 Thread Micah Gersten
Philip Thompson wrote:
> In my php.ini, I have
>
> error_reporting = E_ALL & ~E_NOTICE
>
> When I run a script from the command line, I get a lot of notices
> even when I said I don't want them. Also, in my script, I specified
> error_reporting(E_ERROR) in attempts to explicitly tell it what I
> want. It doesn't work either.
>
> Why am I still getting notices?! BTW, I don't receive notices via a
> web browser, just CLI.
>
> I double-checked to see what INI file was loaded and it's the one I
> expected to see:
>
> [pthomp...@pthompson scripts]$ php --ini
> Configuration File (php.ini) Path: /etc
> Loaded Configuration File: /etc/php.ini
>
> Thoughts on what's happening would be awesome! Thanks in advance.
>
> ~Philip
>

Run this to find out which ini file is being parsed:
php -i | grep ini

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com




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



Re: [PHP] CLI not obeying php.ini

2009-02-05 Thread Philip Thompson

On Feb 5, 2009, at 4:20 PM, Boyd, Todd M. wrote:


-Original Message-
From: Philip Thompson [mailto:philthath...@gmail.com]
Sent: Thursday, February 05, 2009 3:45 PM
To: PHP General list
Subject: [PHP] CLI not obeying php.ini

In my php.ini, I have

error_reporting = E_ALL & ~E_NOTICE

When I run a script from the command line, I get a lot of notices
even when I said I don't want them. Also, in my script, I specified
error_reporting(E_ERROR) in attempts to explicitly tell it what I
want. It doesn't work either.

Why am I still getting notices?! BTW, I don't receive notices via a
web browser, just CLI.

I double-checked to see what INI file was loaded and it's the one I
expected to see:

[pthomp...@pthompson scripts]$ php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini

Thoughts on what's happening would be awesome! Thanks in advance.


In addition to what's already been said, you could try forcing a  
php.ini
file in the current directory by trying the -c command line option.  
I've

done it to try messing with a handful of values here and there for
particular scripts.

HTH,

// Todd


I tried this as well. No luck.

[pthomp...@pthompson scripts]$ php -c /etc -f updateLabels.php >  
labels.log


This issue is mainly annoying and not really a bigger issue b/c  
clients don't see it. Hrm. Oh well. Still open to suggestions. Should  
I try kicking my (virtual) machine? =D


~Philip

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



Re: [PHP] CLI not obeying php.ini

2009-02-05 Thread Philip Thompson

On Feb 5, 2009, at 4:10 PM, Chris wrote:


Philip Thompson wrote:

In my php.ini, I have
error_reporting = E_ALL & ~E_NOTICE
When I run a script from the command line, I get a lot of  
notices even when I said I don't want them. Also, in my script,  
I specified error_reporting(E_ERROR) in attempts to explicitly tell  
it what I want. It doesn't work either.
Why am I still getting notices?! BTW, I don't receive notices via a  
web browser, just CLI.
I double-checked to see what INI file was loaded and it's the one I  
expected to see:

[pthomp...@pthompson scripts]$ php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Thoughts on what's happening would be awesome! Thanks in advance.


Are you including another script (eg pear mail or mbd2 or whatever)?  
Maybe it's setting something and overriding your attempt. A quick  
grep would be able to check that.


I am including other classes. I did a grep on the whole directory and  
the only location that had error_reporting was the spot I wrote into  
my script to force it to E_ERROR. Odd, I know...


Thanks,
~Philip

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



RE: [PHP] CLI not obeying php.ini

2009-02-05 Thread Boyd, Todd M.
> -Original Message-
> From: Philip Thompson [mailto:philthath...@gmail.com]
> Sent: Thursday, February 05, 2009 3:45 PM
> To: PHP General list
> Subject: [PHP] CLI not obeying php.ini
> 
> In my php.ini, I have
> 
> error_reporting = E_ALL & ~E_NOTICE
> 
> When I run a script from the command line, I get a lot of notices
> even when I said I don't want them. Also, in my script, I specified
> error_reporting(E_ERROR) in attempts to explicitly tell it what I
> want. It doesn't work either.
> 
> Why am I still getting notices?! BTW, I don't receive notices via a
> web browser, just CLI.
> 
> I double-checked to see what INI file was loaded and it's the one I
> expected to see:
> 
> [pthomp...@pthompson scripts]$ php --ini
> Configuration File (php.ini) Path: /etc
> Loaded Configuration File: /etc/php.ini
> 
> Thoughts on what's happening would be awesome! Thanks in advance.

In addition to what's already been said, you could try forcing a php.ini
file in the current directory by trying the -c command line option. I've
done it to try messing with a handful of values here and there for
particular scripts.

HTH,


// Todd

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



Re: [PHP] CLI not obeying php.ini

2009-02-05 Thread Philip Thompson

On Feb 5, 2009, at 4:17 PM, Ashley Sheridan wrote:


On Thu, 2009-02-05 at 15:45 -0600, Philip Thompson wrote:

In my php.ini, I have

error_reporting = E_ALL & ~E_NOTICE

When I run a script from the command line, I get a lot of notices
even when I said I don't want them. Also, in my script, I specified
error_reporting(E_ERROR) in attempts to explicitly tell it what I
want. It doesn't work either.

Why am I still getting notices?! BTW, I don't receive notices via a
web browser, just CLI.

I double-checked to see what INI file was loaded and it's the one I
expected to see:

[pthomp...@pthompson scripts]$ php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini

Thoughts on what's happening would be awesome! Thanks in advance.

~Philip


Depending on what distro (I'm assuming Linux, who would run PHP on
anything else? ;) ) you may have a separate php.ini for the CLI. I
believe SUSE does this, and it could well be that other distros use a
similar model.

If you are running SUSE, the config files should be in /etc/php5/


Ash
www.ashleysheridan.co.uk


There are other .ini files located in /etc/php.d, but none specify  
error_reporting...


~Phil

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



Re: [PHP] CLI not obeying php.ini

2009-02-05 Thread Chris

Philip Thompson wrote:

In my php.ini, I have

error_reporting = E_ALL & ~E_NOTICE

When I run a script from the command line, I get a lot of notices 
even when I said I don't want them. Also, in my script, I specified 
error_reporting(E_ERROR) in attempts to explicitly tell it what I want. 
It doesn't work either.


Why am I still getting notices?! BTW, I don't receive notices via a web 
browser, just CLI.


I double-checked to see what INI file was loaded and it's the one I 
expected to see:


[pthomp...@pthompson scripts]$ php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini

Thoughts on what's happening would be awesome! Thanks in advance.


Are you including another script (eg pear mail or mbd2 or whatever)? 
Maybe it's setting something and overriding your attempt. A quick grep 
would be able to check that.


--
Postgresql & php tutorials
http://www.designmagick.com/


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



Re: [PHP] CLI not obeying php.ini

2009-02-05 Thread Ashley Sheridan
On Thu, 2009-02-05 at 15:45 -0600, Philip Thompson wrote:
> In my php.ini, I have
> 
> error_reporting = E_ALL & ~E_NOTICE
> 
> When I run a script from the command line, I get a lot of notices  
> even when I said I don't want them. Also, in my script, I specified  
> error_reporting(E_ERROR) in attempts to explicitly tell it what I  
> want. It doesn't work either.
> 
> Why am I still getting notices?! BTW, I don't receive notices via a  
> web browser, just CLI.
> 
> I double-checked to see what INI file was loaded and it's the one I  
> expected to see:
> 
> [pthomp...@pthompson scripts]$ php --ini
> Configuration File (php.ini) Path: /etc
> Loaded Configuration File: /etc/php.ini
> 
> Thoughts on what's happening would be awesome! Thanks in advance.
> 
> ~Philip
> 
Depending on what distro (I'm assuming Linux, who would run PHP on
anything else? ;) ) you may have a separate php.ini for the CLI. I
believe SUSE does this, and it could well be that other distros use a
similar model.

If you are running SUSE, the config files should be in /etc/php5/


Ash
www.ashleysheridan.co.uk


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



[PHP] CLI not obeying php.ini

2009-02-05 Thread Philip Thompson

In my php.ini, I have

error_reporting = E_ALL & ~E_NOTICE

When I run a script from the command line, I get a lot of notices  
even when I said I don't want them. Also, in my script, I specified  
error_reporting(E_ERROR) in attempts to explicitly tell it what I  
want. It doesn't work either.


Why am I still getting notices?! BTW, I don't receive notices via a  
web browser, just CLI.


I double-checked to see what INI file was loaded and it's the one I  
expected to see:


[pthomp...@pthompson scripts]$ php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini

Thoughts on what's happening would be awesome! Thanks in advance.

~Philip

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