123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <!DOCTYPE html>
- <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Building Custom PHP Error Handling</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta charset="UTF-8">
- <meta name="keywords" content="web server,apache httpd,apache,web developer,system administrator,system monitoring,PHP,error handling,fun with code,i12bretro">
- <meta name="author" content="i12bretro">
- <meta name="description" content="Building Custom PHP Error Handling">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
- <script type="text/javascript" src="includes/js/steps.js"></script>
- <link href="css/steps.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="gridContainer">
- <div class="topMargin"></div>
- <div id="listName" class="topMargin">
- <h1>Building Custom PHP Error Handling</h1>
- </div>
- <div></div>
- <div id="content">
- <ol>
- <li>Navigate to PHP install directory in Explorer</li>
- <li>Edit php.ini in a text editor</li>
- <li>Find ;auto_prepend_file</li>
- <li>Uncomment the line by removing the ;</li>
- <li>Setting the value of auto_prepend_file to the full path of a PHP file will include the file automatically before every .php page the server loads
- <p>auto_prepend_file = "C:\xampp\htdocs\library\global_header.php";</p>
- <ul>
- <li>There is also an auto_append_file setting to add the include after every .php page the server loads</li>
- </ul>
- </li>
- <li>Save</li>
- <li>Navigate to Apache install directory/htdocs in Explorer</li>
- <li>Create a library directory</li>
- <li>Download custom_php_errors.zip <a href="https://drive.google.com/open?id=1RGBcRU3m2-qgM9yeFAFMZmC21OGH8yrE" target="_blank">Download</a></li>
- <li>Extract the contents of custom_php_errors.zip to the library directory
- <p>/library/global_header.php<br />
- /library/images/bottom.gif<br />
- /library/images/error_bg.jpg<br />
- /library/images/mainbg.gif<br />
- /library/images/top.gif</p>
- </li>
- <li>Restart the Apache service</li>
- <li>Create a .php page with intentional errors to invoke the new error page</li>
- <li>Launch a browser and navigate to the test .php page</li>
- </ol>
- </div>
- </div>
- </body>
- </html>
-
|