Raikoug
Raikoug

Reputation: 357

There is no php log

I'm programming in php on my machine where I freshly installed:

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:

ini_set("log_errors", 1);

ini_set("error_log", "/tmp/php-error.log");

error_log( "Hello, errors!" );

And nothing was logged.

This didn't work either

I'm really struggling programming without a error log...

Thanks to anyone.

Upvotes: 0

Views: 159

Answers (1)

Raikoug
Raikoug

Reputation: 357

Finally I got what was the problem.

Well.. maybe it is just MY problem...

By the way, with php 7.0 I had a php.ini corrupted file, I didn't see it had a lot of strange character.

I had to correct all the file and everything worked as a charme.

Hope anyone else could benefice from this.

Upvotes: 0

Related Questions