Re: [PHP] CLI not obeying php.ini



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

-----Original Message-----
From: Philip Thompson [mailto:philthathril@xxxxxxxxx]
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:

[pthompson@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.

[pthompson@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
.



Relevant Pages

  • Re: MythTV
    ... When you have the command to record, ... Wether you want to do that in CLI or in GUI is then up to you. ... Just make a bash script with a menu with the channels. ...
    (alt.os.linux.suse)
  • Interactive input
    ... demands keyboard input and then provide a single line of input, ... this Run command wants to invoke php-cgi.exe to run a short ... script is by going into interactive mode. ... COM) the phpinfothat the CLI ...
    (microsoft.public.win2000.cmdprompt.admin)
  • RE: [PHP] CLI not obeying php.ini
    ... CLI not obeying php.ini ... When I run a script from the command line, I get a lot of notices.... ...
    (php.general)
  • using variable in Where clause
    ... I am trying to create a script that will kill a process based on the process ... name which is passed to the script as a cli argument. ... command. ...
    (microsoft.public.scripting.vbscript)
  • Re: Problems trying to configure Linux laptop to print to Windows XP shared printer
    ... map to guest = Never ... check password script = ... enumports command = ... ldap delete dn = No ...
    (comp.os.linux.setup)