This is a super simple command but there is something about the following sequence of characters that I simply cannot retain in my brain.
tail -f /tmp/php-errors
This is a handy command to debug your PHP on your server where you may have errors hidden.
- The tail command shows the end of a file.
- The -f flag tells it to keep the file open, while you debug your code
- The /tmp/php-error is ( I assume! ) a temporary error log file that stores PHP errors on the server.
If you use
error_log(print_r(debug_backtrace(), true )) with this command, you can monitor the call stack in real time. Super useful when debugging!