Author: Manuel Lemos
Updated on: 2022-07-28
Posted on: 2022-07-12
Viewers: 161 (July 2022)
Categories: PHP Tutorials, Lately in PHP Podcast
Often these consequences cause your site's PHP code to trigger errors. These errors may start appearing after you do a PHP version upgrade.
One way to determine if there were errors after you made production environment changes is to monitor PHP errors and send emails for the new PHP errors that started to appear.
Read this article, watch a 3-minute video, or listen to part 9 of episode 92 of the Lately in PHP podcast to learn how to monitor your PHP errors quickly and be notified by email, so you can fix the environment that causes the errors.
In this article you can learn:
How to Plan a PHP Version Upgrade Successfully
1. Previous Article: Why You Need to Choose the Right Moment to Upgrade to a New PHP Version
2. Previous Article: When Is the Right Time to Upgrade
3. Previous Article: How to Plan a PHP Version Upgrade Successfully
4. Previous Article: How to Setup a Development Environment Separate from the Production Environment
5. Previous Article: What Are Your App Features to Test First Before a PHP Version Upgrade
6. Previous Article: Test Crucial PHP and Environment Features Next
7. Previous Article: The Right Order to Execute the Steps to Upgrade to a New PHP Version
8. Previous Article: How to Verify if an Upgrade Really Succeeded
9. This Article: Monitor Your Logos to Check if Your PHP Applications Are Working Well After a PHP Version Upgrade
10. Next Article: Methods and Tools Used by Other PHP Community of Developers
Download Size: 2MB Listeners: 570
Introduction music obtained with permission from: http://spoti.fi/NCS
Sound effects obtained with permission from: https://www.zapsplat.com/
In iTunes, use the Subscribe to Podcast... item of the Advanced menu, and then enter the URL above to subscribe to this podcast.
See the Lately in PHP podcast play list on YouTube and Subscribe to this channel there.
Episode 92 Part 9 Video
3. What Should You Do Upgrade Successfully
3.6.2 Monitor Your Logs to Check If Your Application is Working
You need to monitor your logs to check if your application
is working. So your application also needs to generate log files that you can take a look and confirm that everything is working correctly. If something is wrong you'll also need to have error logs.
The next recommendation is to monitor your logs to check if your application is working.
So your application also needs to generate log files that you can take a look and confirm that everything is working correctly. If something is wrong you will also need to have error logs.
Activity logs are something. Error logs are something else. PHP has its own error log.
I suggest that you have the PHP error log enabled, so you can check if there are issues in PHP that are affecting your application. And you also need to monitor those logs.
The activity logs and the error logs. The error logs are more important because they reflect things that are not working correctly and you need to fix those first. Okay?
So what I suggest to monitor your logs could be any tool but I have my own class that I use. I use a class that monitors log files. You give the path of the log file. It could be the PHP error log file.
You also need to be able to enable the PHP error log file in the PHP configuration because it is not enabled by default.
So once you change that configuration, restart Web server to make sure that PHP configuration is reloaded, you will be able to track any errors that happen in PHP.
That is really, really important because many issues that you have in your application lead to errors in PHP code and you can monitor the PHP error log the to make sure there are anything there that you need to fix.
Okay? I'm going to provide the link to the package that you can download or install using Composer, or whatever means you want. I use this as a separate script with a class. I have a script that calls a class that does that.
And you can also check a tutorial article that tells about how to detect bugs in your environment as soon as possible using this log watcher class. Okay?
- Article on PHP Log All Errors to a Log File to Get Detailed Information
- PHP documentation on setting the PHP error log
- Log watcher class package
- Log watcher class example script
- Log watcher class download or installation with Composer
- Article: 10 Steps to properly do PHP Bug Tracking and Fixing as Fast as possible
You need to be a registered user or login to post a comment
1,605,961 PHP developers registered to the PHP Classes site.
Be One of Us!
Login Immediately with your account on:
No comments were submitted yet.