Why would I see PHP NOTICE and ERRORs when running a script as a regular user, but not as root?

Posted by Shawn on Stack Overflow See other posts from Stack Overflow or by Shawn
Published on 2010-04-21T16:06:48Z Indexed on 2010/04/25 20:33 UTC
Read the original article Hit count: 196

Filed under:
|

As far as I can tell, there's no difference between the error reporting or message redirection between users. They both use the same PHP ini.

However, when I run a script as a regular user, I get tons of NOTICES, when run as root, I get none. When starting PHP interactive mode as a regular user, I get two PHP Warnings that 'memcache' and 'xmlwriter' are already loaded; when starting as the root user, I get no warnings.

I know that I should be fixing the warnings, not "making the warnings go away;" that's on the ticket. The question is, Why are the users treated differently? Why does a regular user get notices and warnings, but root does not, even if their error reporting are the same?

© Stack Overflow or respective owner

Related posts about php

Related posts about php5