Tristan
Tristan

Reputation: 1685

Can you call PHP from the command line and display errors to terminal, but without writing to error_log?

The folowing can be used to show errors on the terminal screen when you use PHP from the command line.

php -d display_errors=on filename.php

However, when I do this, it also creates or appends to a file error_log in that same folder.

Is there any way to turn the displaying of errors on, but disable writing to an error_log file?

Upvotes: 1

Views: 920

Answers (1)

Sempoinus
Sempoinus

Reputation: 81

Try to add error_reporting=E_ALL. I think this one should show you errors inside of cli instead of log file.

php -d error_reporting=E_ALL filename.php

Upvotes: 1

Related Questions