Disable warning and notice in php apache web server

It ‘s quite easy to disable warning and notice in php apache web server, but sometimes it will take us a lot of time to do. Now I write down this tip and you may save it down and use in the case you need.


This ‘s useful when you want to run a product mode of an PHP source but you don’t want to touch to source code to find out where it configure the product mode. Actually, if you choose the hosting in magento hosting solution list, they are all working in product mode, if you want to run in development mode you have to change it in .htaccess or in php code. Now let ‘s do these steps to disable warning and notice for php in apache web server:

1. Find out file php.ini

Any package include apache like wamp, xampp or lamp, they are all using http://localhost as default address for gateway server so that when we visit this address on browser we will have way to access phpinfo()

And in phpinfo() text you will see where the file php.ini store in

2. Configure php.ini

Let ‘s open php.ini file and uncomment this code line

[code lang=”shell”]error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED[/code]

The right value you need to add or edit the default value. Or you may have to remove semicolon “;” in the first of line.

Now restart web server and see the magic. Thanks and welcome any comment





2 responses to “Disable warning and notice in php apache web server”

  1. Kyle Avatar

    It doesn’t work here for my site. Not sure why it still display warning and notice a lot. Any idea?

  2. magentohostsolution Avatar

    Did you restart your wamp server? Or can you try to restart your computer? Other than that, you need to make sure the .htaccess file doesn’t override the default configuration.