php error_log does not log php errors?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

php error_log does not log php errors?

Postby carsten888 » 20. December 2018 15:12

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
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: php error_log does not log php errors?

Postby carsten888 » 22. December 2018 10:41

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...
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: php error_log does not log php errors?

Postby carsten888 » 22. December 2018 10:50

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)
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: php error_log does not log php errors?

Postby carsten888 » 22. December 2018 14:51

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
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 41 guests