PHP error reporting: Turn off notices for undefined variables only?-Collection of common programming errors

programming-amp-design Retrieving original web address
discoverer: Spearfish Hi, Does anybody know what I need to set my error reporting in PHP to if I want to suppress notices of undefined variables, but -not- any other notices?

Thanks.

  1. go to your php folder and navigate to the php.ini file (might be in /etc/) and open it using a basic text editor: Use the find option (Ctrl+F) and find the “error_reporting” line: change error_reporting = E_ALL to error_reporting = E_ALL & ~E_NOTICE If for some reason you don’t have access to the PHP configuration file (shared hosting?) you can use the error reporting function to accomplish the same thing:

    error_reporting (E_ALL & ~E_NOTICE);

Source of the problem: answers.yahoo

Web site is in building

Originally posted 2013-11-09 21:11:18.