0048.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Building Custom PHP Error Handling</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="web server,apache httpd,apache,web developer,system administrator,system monitoring,PHP,error handling,fun with code,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Building Custom PHP Error Handling">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  12. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  13. <script type="text/javascript" src="includes/js/steps.js"></script>
  14. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  15. </head>
  16. <body>
  17. <div id="gridContainer">
  18. <div class="topMargin"></div>
  19. <div id="listName" class="topMargin">
  20. <h1>Building Custom PHP Error Handling</h1>
  21. </div>
  22. <div></div>
  23. <div id="content">
  24. <ol>
  25. <li>Navigate to PHP install directory in Explorer</li>
  26. <li>Edit php.ini in a text editor</li>
  27. <li>Find ;auto_prepend_file</li>
  28. <li>Uncomment the line by removing the ;</li>
  29. <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
  30. <p>auto_prepend_file = &quot;C:\xampp\htdocs\library\global_header.php&quot;;</p>
  31. <ul>
  32. <li>There is also an auto_append_file setting to add the include after every .php page the server loads</li>
  33. </ul>
  34. </li>
  35. <li>Save</li>
  36. <li>Navigate to Apache install directory/htdocs in Explorer</li>
  37. <li>Create a library directory</li>
  38. <li>Download custom_php_errors.zip <a href="https://drive.google.com/open?id=1RGBcRU3m2-qgM9yeFAFMZmC21OGH8yrE" target="_blank">Download</a></li>
  39. <li>Extract the contents of&nbsp;custom_php_errors.zip to the library directory
  40. <p>/library/global_header.php<br />
  41. /library/images/bottom.gif<br />
  42. /library/images/error_bg.jpg<br />
  43. /library/images/mainbg.gif<br />
  44. /library/images/top.gif</p>
  45. </li>
  46. <li>Restart the Apache service</li>
  47. <li>Create a .php page with intentional errors to invoke the new error page</li>
  48. <li>Launch a browser and navigate to the test .php page</li>
  49. </ol>
  50. </div>
  51. </div>
  52. </body>
  53. </html>