forked from i12bretro/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0048.html
56 lines (54 loc) · 2.9 KB
/
0048.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!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,Windows,Web Server Customization,Web Server Administration,Web Based,System Administration,Self-hosted,PHP Application,Microsoft Windows,Install Guide,Home Lab,HTTPD,Free Software,Development,Developer,Custom Error Page,Custom Error,PHP Custom Error Pages,PHP Configuration,PHP Error Handling,Apache HTTPD,How To,Tutorial,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">
<meta name="revised" content="03/26/2022 01:04:45 PM" />
<link rel="icon" type="image/x-icon" href="includes/favicon.ico">
<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>