Page 1 of 1

php error_log does not log php errors?

PostPosted: 20. December 2018 15:12
by carsten888
In php.ini
Code: Select all
error_log="C:\xampp\php\logs\php_error_log"

and
Code: Select all
log_errors=On

but that /logs folder does not exist. So I created it, and the log-file, but it still does not log any errors.

The errors are displayed in the browser, so there are php errors, and error_reporting is functional.

xampp v.3.2.2

Re: php error_log does not log php errors?

PostPosted: 22. December 2018 10:41
by carsten888
Code: Select all
error_log="C:\xampp\php\logs\php_error_log"

does not have a file-extension defined, so i experimenten with .log and .txt files in the output folder.
Also tried defining the file-extension in the php.ini file (why is it defined 2 times?! line 578 AND line 952 ?)

With each try I stopped all services and quit to restart xampp all over again, just in case of some wierd cache. But... nothing. No output.

Very hard to debug anything like this when I only have to work with the errors in the browser.

Pleasepleaseplease. help me...

Re: php error_log does not log php errors?

PostPosted: 22. December 2018 10:50
by carsten888
YYYYYEESSSS!
got it working! :D

in php.ini reset the default:
Code: Select all
error_log="C:\xampp\php\logs\php_error_log"

I created the dir \logs and added file php_error_log.log.
After a number of restarts (crazy caching?) it just started working.

tip:
If you have to log open in notepad and have an error, do not expect the new errors to show in notepad (you have to close and open it again before the change shows). I use an ancient version of Mecromedia(!) Dreamweaver (from the previous century) which nicely reloads the log as errors are made.


SOLVED 8)

Re: php error_log does not log php errors?

PostPosted: 22. December 2018 14:51
by carsten888
and then it just stopped working.... :shock:

and all of a sudden there is a new file in c:/xampp/logs:
php_error_log (with NO extension-name!).

OK :roll:
whatever. Its working now. I hope it keeps working. :D