Я использую тонкий фреймворк и добавил error_reporting(E_ALL);
в первую строку моего файла public / index.php.
Я использую apache2 и Ubuntu 18.
Это файл conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /pathtoproject/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
php_flag log_errors on
php_flag display_errors on
php_flag display_startup_errors on
php_value error_log ${APACHE_LOG_DIR}/php_errors.log
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
<Directory "/pathtoproject/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all granted
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
</IfModule>
</Directory>
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
А так выглядит мой phpinfo
Мои разрешения для файла журнала ошибок
-rwxrwxrwx 1 www-data www-data 0 Dec 6 20:36 php_errors.log