This is driving me nuts.
I install a clean copy of the latest CodeIgniter (3.1.9) in my Centos-Apache-PHP server (PHP 7.2.6).
Globally, my PHP logs errors to (say) /var/www/logs/php_err.log.
I check that indeed my PHP errors are logged there, including parse errors (PHP Parse error: syntax error, unexpected 'public' (T_PUBLIC)...) , in any non-CI PHP page. It also logs if the parse error happens in a file included in by require_once().
I also check that, inside CI application code (controller or model), it logs there when I call error_log("something");.
I even check that if I purposedly break CI's index.php (adding a asd line after the opening <?php, the parse error appears in my log.
The problem is that a parse error in (say) a controller (say, remove the first brace in application/controllers/Welcome.php ), gives a plain 500 error page, and nothing in the log file.
By changing the environment from productionto development I can see the parse error in the web page. But still nothing in the logs. And, in any case, I definitely want the errors in the logs, also in production!
The problem persists if I comment out the whole "ERROR_REPORTING" block in index.php
Why is this happening?