You may sometimes forget to revert the dev settings when you have finished your app and uploaded it to production servers. The above techniques are useful in any environment. To enable PHP error logging for the current call in the individual file, insert the following code : ini_set('display_errors', 1) īut still, you need to enable this line in the php.ini file for reporting parse errors: display_errors = on error_reporting = E_ALL & ~E_NOTICEĮrror_reporting = E_ALL & ~E_NOTICE | E_STRICTĮrror_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ER… _ERROR But remember to remove the semicolon ( ) from each line. And you can enable it in the php.ini file. The other best practice is to create a configuration file in your project. You can enable/disable error logs from php.ini and individual php files. When you are working in a dev environment on any web hosting for PHP, you must turn on error reporting to check if the PHP error logs are being generated.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |