I'm programming in php on my machine where I freshly installed:
- Centos 6: centos-release-6-10.el6.centos.12.3.x86_64
- Php 7 - PHP 7.0.31 (cli) (built: Jul 17 2018 15:40:48) ( NTS ) (Zen Engine 3.0.0)
- Apache 2 - Server version: Apache/2.2.15 (Unix)
As fresh install nothing were logged. (first time this happens)
My php info tell me I have /etc/php.ini configuration file, where I have:
error_reporting = E_ALL
display_errors = Off
display_startup_errors = On
log_errors = On
log_errors_max_len = 0
html_errors = On
error_log = /var/log/httpd/php-error.log
On php info I see correct variables as wrote here.
In httpd.conf
ErrorLog "/var/log/httpd/error_log"
LogLevel debug
There is no ovewrite configuration in my virtualhost. I just tried debug to fix this issue, but nothing.
To make sure for me that anything can have access to log path, I used chmod 777 on the folders /var, /var/log, /var/log/httpd, and on error.log apache file. I didn't on php error file since it's not present, and as far as I know, Apache (or php) sould create it on it's own.
My php has eveident errors, and on different environment (with php 5) is naturally logged on apache log file.
I obviously restarted apache service at any change.
I searched really a lot before asking, and nothing that was suggested has never worked.
Am I really missing something?
Thanks. Riccardo
Update: After the best badge I could have earned: "Tumbleweed", I want to update with something more I tried:
- I tried with code inside the php file:
ini_set("log_errors", 1);
ini_set("error_log", "/tmp/php-error.log");
error_log( "Hello, errors!" );
And nothing was logged.
display_errors = onin php.ini
This didn't work either
I'm really struggling programming without a error log...
Thanks to anyone.