Subscribe Newsletter

Your Name  : 
Email Address *  : 
  • MDunkleSr: Do you know of a way to get the full post variable using JInput? And...
  • brijmohankaradia: @Awkens @Darkblack add below line before while:...
  • brijmohankaradia: @Awkens @Darkblack add below line before while:...
  • Ahsan: Dear Bala-Krishna, I Was installing CATEGORY SEO META TAGS Plugin in my...
  • PNR Enquiry: Thanks for sharing all these website but you need one more i.e...
  • Train PNR Status: I usually use ww.pnrstatuss.in for checking Railway PNR Status...
  • Online Pnr Status: Before moving on let me tell you that your article was really...
  • Irctc Pnr Check: First of all, thanks for sharing such a valuable piece of...
  • Berita Terbaru: Thanks for tips! helpful..
  • pnrworld: Just by one click now a days passengers can check there current status...
  • remote backup service: Disaster recovery plan with certain objectives like backup...
  • ??? ?????? 2013: Microsoft Extended Windows 7 Enterprise 90-day Trial Download...
  • Indian Railway PNR Status Check: We can check PNR status online, via SMS and even...
  • Archives

  • Blog Stats

Control PHP Error Reporting With .htaccess

Create .htaccess file or use existing .htaccess file in your hosting site. Add below line at the top of file content.
[sourcecode language='php']
# to stop php startup errors
php_flag display_startup_errors off
# to stop all php errors and warning
php_flag display_errors off
[/sourcecode]
You can also control level of error reporting. Here is the .htaccess syntax:
[sourcecode language='php']
# php directive for setting error level
php_value error_reporting integer
[/sourcecode]
Example:
[sourcecode language='php']
# report everything except run-time notices.
php_value error_reporting 8191
# report both fatal and non-fatal compile-time warnings by the Zend Engine
php_value error_reporting 128
# report run-time notices, compile-time parse errors, run-time errors and warnings
php_value error_reporting 8
# report fatal run-time errors and unrecoverable errors
php_value error_reporting 1
[/sourcecode]


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

3 Responses to “Control PHP Error Reporting With .htaccess”

  1. I am not new to blogging and truly value your site. There is much innovative subject that peaks my interest. I am going to bookmark your web site and keep checking you out.

  2. Hello..
    How not to display any notices and display the rest?

    php_value error_reporting 8191 does show notices.

  3. I’m with Martyn, how do you do: error_reporting(E_ALL ^ E_NOTICE); ???

Leave a Reply