0048.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  12. <script type="text/javascript" src="includes/js/steps.js"></script>
  13. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  14. </head>
  15. <body>
  16. <div id="gridContainer">
  17. <div class="topMargin"></div>
  18. <div id="listName" class="topMargin">
  19. <h1>Building Custom PHP Error Handling</h1>
  20. </div>
  21. <div></div>
  22. <div id="content">
  23. <ol>
  24. <li>Navigate to PHP install directory in Explorer</li>
  25. <li>Edit php.ini in a text editor</li>
  26. <li>Find ;auto_prepend_file</li>
  27. <li>Uncomment the line by removing the ;</li>
  28. <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
  29. <p>auto_prepend_file = &quot;C:\xampp\htdocs\library\global_header.php&quot;;</p>
  30. <ul>
  31. <li>There is also an auto_append_file setting to add the include after every .php page the server loads</li>
  32. </ul>
  33. </li>
  34. <li>Save</li>
  35. <li>Navigate to Apache install directory/htdocs in Explorer</li>
  36. <li>Create a library directory</li>
  37. <li>Download custom_php_errors.zip <a href="https://drive.google.com/open?id=1RGBcRU3m2-qgM9yeFAFMZmC21OGH8yrE" target="_blank">Download</a></li>
  38. <li>Extract the contents of&nbsp;custom_php_errors.zip to the library directory
  39. <p>/library/global_header.php<br />
  40. /library/images/bottom.gif<br />
  41. /library/images/error_bg.jpg<br />
  42. /library/images/mainbg.gif<br />
  43. /library/images/top.gif</p>
  44. </li>
  45. <li>Restart the Apache service</li>
  46. <li>Create a .php page with intentional errors to invoke the new error page</li>
  47. <li>Launch a browser and navigate to the test .php page</li>
  48. </ol>
  49. </div>
  50. </div>
  51. </body>
  52. </html>