How to Turn Off Display Errors in PHP
PHP is a programming language designed specifically for websites. The program operates as a plugin for most Web server applications. PHP operates by running in the background and executing the code included in a file before supplying an HTML response back to a user's browser. When PHP encounters an error, its default behavior is to notify the user of the error with a visible message. This behavior can sometimes reveal too much information or confuse your users. You can disable the display of errors in your application by modifying a variable in PHP's configuration file.
Instructions
-
-
1
Open the Start menu and type "notepad" in the "Search" bar. Right-click "Notepad" from the Programs category of the result list, then click "Run as administrator."
-
2
Click "Continue" or supply your administrative password if prompted by the User Account Control program.
-
-
3
Click "File" and "Open...". Type "%systemroot%\php.ini" -- without the quotes -- and click "Open" to open the PHP configuration file in Notepad.
-
4
Hold down "Ctrl" and click "F" to open a "Find..." dialog.
-
5
Type "display_errors" without quotation marks. Press "Enter" to locate the "display_errors" line.
-
6
Locate the value immediately to the right of "display_errors." Change the value from "1" to "0."
-
7
Save your document from the "File" menu in Notepad.
-
8
Restart your Web server to apply the changes. If you use Microsoft's built-in IIS Web Server, open the Start menu and type "iisreset" then press "Enter" to restart IIS.
-
1