Building Custom PHP Error Handling
i12bretro
#PHP #ApacheHTTPD #ErrorHandling
Full steps can be found at https://i12bretro.github.io/tutorials/0048.html
In this video learn how to build custom PHP error handling using an Apache webserver.
- Navigate to PHP install directory in Explorer
- Edit php.ini in a text editor
- Find ;auto_prepend_file
- Uncomment the line by removing the ;
- 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 auto_prepend_file="C:\xampp\htdocs\library\global_header.php"; There is also an auto_append_file setting to add the include after every .php page the server loads
- Save
- Navigate to Apache install directory/htdocs in Explorer
- Create a library directory
- Download custom_php_errors.zip https://drive.google.com/open?id=1RGBcRU3m2-qgM9yeFAFMZmC21OGH8yrE
- Extract the contents of custom_php_errors.zip to the library directory /library/global_header.php /library/images/bottom.gif /library/images/error_bg.jpg /library/images/mainbg.gif /library/images/top.gif
- Restart the Apache service
- Create a .php page with intentional errors to invoke the new error page
- Launch a browser and navigate to the test .php page ... https://www.youtube.com/watch?v=VZ9l9ez2fk8
2021-08-15
0.0 LBC
Copyrighted (contact publisher)
13777921 Bytes