Use the following code:
ini_set("log_errors", 1);
ini_set("error_log", "/tmp/php-error.log");
error_log( "Hello, errors!" );
Then watch the file:
tail -f /tmp/php-error.log
Or update php.ini
as described in this blog entry from 2008.
More Related Contents:
- How can I get useful error messages in PHP?
- How to squeeze error message out of PDO? [duplicate]
- PHP does not display error messages
- Reference – What does this error mean in PHP?
- How can I get useful error messages in PHP?
- How can I get useful error messages in PHP?
- PHP : Custom error handler – handling parse & fatal errors
- Fastest way to check if a string is JSON in PHP?
- PHP: exceptions vs errors?
- How do I turn off PHP Notices?
- How to catch this error: “Notice: Undefined offset: 0”
- How can I get PHP to produce a backtrace upon errors?
- Disable Laravel’s built-in error handling methods
- MYSQLi error: User already has more than ‘max_user_connections’ active connections [duplicate]
- Handle fatal errors in PHP using register_shutdown_function()
- Good error handling with file_get_contents [duplicate]
- How to do error logging in CodeIgniter (PHP)
- Outputting all PHP errors to database not error_log
- Disabling Strict Standards in PHP 5.4
- How to handle error for duplicate entries?
- PHP constructor to return a NULL
- Best way to handle errors on a php page?
- Error handling in PHP
- PayPal gateway has rejected request. Security header is not valid (#10002: Security error Magento
- ‘At’ symbol before variable name in PHP: @$_POST
- Request exceeded the limit of 10 internal redirects
- set_error_handler() doesn’t work for FATAL error
- Can I detect and handle MySQL Warnings with PHP?
- How do I ensure I caught all errors from MySQLi::multi_query?
- Apache’s ErrorDocument directive does not redirect