10 Steps to properly do PHP Bug Tracking and Fixing as Fast as possible – Part 3

PHP, Techniques, Tips, Tutorials
7. Send PHP Errors to an Error Log File 8. Add more Error Context Information to PHP Errors Logs 7. Send PHP Errors to an Error Log File If you should not display PHP errors on the Web pages, you should be able to see them somehow. A better alternative is to send the errors to a error log file. This way you can watch what is going on without disclosing sensitive information to your site users. You can enable PHP error logs adding a few configuration lines to your php.ini file. Additionally you also set other useful PHP options. error_reporting = E_ALL log_errors = On error_log = /path/to/php_error_log log_errors_max_len = 0 ignore_repeated_errors = On ignore_repeated_source = Off report_memleaks = On track_errors = On html_errors = Off 8. Add more…
Read More

10 Steps to properly do PHP Bug Tracking and Fixing as Fast as possible – Part 2

PHP, Techniques, Tips, Tutorials
4. Use a Version Control System to Maintain Project files, Except Configuration files5. Track PHP Errors with Assertion Condition Tests6. Do Not Display PHP Errors on your Web pages4. Use a Version Control System to Maintain Project files, Except Configuration filesYou should always use a version control system (VCS) to maintain your application source code, but keep in mind that the configuration/local.php script should never be committed to the VCS repository. The reason for this is that it is not a static file in your project. It is different depending on whether you are in the development, staging or production environment.The default values for the options in the configuration class should be the ones to be used in the production environment, except for sensitive values that are related with the…
Read More

10 Steps to properly do PHP Bug Tracking and Fixing as Fast as possible – Part 1

PHP, Techniques, Tips, Tutorials, Web Development Services
No matter how hard you try to test your PHP applications before putting them in production, you will always ship code to your server that has bugs. Some of those bugs will be very serious and need to be fixed before they cause greater damages to your application data that may be too hard to recover. Contents 1. Test as Much as Possible Before in your Development Environment 2. Test in a Staging server Before you Send it to the Production Server 3. Separate your Code from Environment Configuration files   1. Test as Much as Possible Before in your Development Environment This one should be obvious but it is amazing how many PHP developers do not do it. The worst case is of those developers that do not use…
Read More