I always handled it the other way around for production systems.
Generally error reporting defaults to off in the php.ini file and then while 
you are developing a script, module, etc you turn it on in the runtime for 
debugging, this way it defaults to the more secure option. (it is also the way 
it is handled on many shared hosts where access to the ini file may not be 
allowed)


-Christopher



On Monday, July 14, 2014 8:41 AM, Lonnie Abelbeck <li...@lonnie.abelbeck.com> 
wrote:
 


Hi Michael,

This question probably belongs on the -devel list, but here goes...

To directly answer your question, you could edit "/etc/php.ini" and restart 
'lighttpd' to apply the change.  Though this is not what I would do.

You could "ignore display errors" selectively by using the '@' error control 
operator, ex.
--
$err = @foo();
--
Any display errors will be ignored for that one call.
http://php.net/manual/en/language.operators.errorcontrol.php

-- Turn off all error reporting at runtime --
error_reporting(0);
--
http://php.net/manual/en/function.error-reporting.php

The last two are runtime overrides to the "/etc/php.ini" defaults, which is the 
better route to go.

Lonnie



On Jul 13, 2014, at 11:33 PM, Michael Knill wrote:

> Sorry group if this is a dumb question.
> 
> I need to edit php.ini to turn off error display.
> 
> I have moved my www directory to /mnt/kd of which there exists a php.ini and 
> also in www/admin.
> On doing php -i | grep ‘php.ini’ I find that its actually reading from 
> /etc/php.ini.
> 
> Do I edit /etc/php.ini or is there something I can change to make it read the 
> one in www?
> 
> Regards
> Michael Knill


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck®
Code Sight™ - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to 
pay...@krisk.org.
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck&#174;
Code Sight&#153; - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to 
pay...@krisk.org.

Reply via email to