php.ini contains following parameters:
track_errors=On
error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT
log_errors=On
error_log="C:\xampp\php\logs\php_error_log"
but "logs" folder is missing in this path. Its not even hidden folder. where to find php error logs?
OS:windows 8.1
php version 5.6.24
\xampp\apache\logs\error.log is the default location of error logs in PHP. Show activity on this post. By default, the XAMPP PHP log file path is in /xampp_installation_folder/php/logs/php_error_log, but I noticed that sometimes it would not be generated automatically.
Restart Apache using XAMPP control panel (stop and start). Then when an error occurs the file will be generated fine and you'll be again able to open the PHP logs from XAMPP console Show activity on this post.
Finally, sometimes XAMPP is not working due to an issue with MySQL, rather than Apache. However, the problem is still often a port conflict, which means that by now you should have a good idea on how to fix it. In this case, you’ll need to access your php.ini file instead of your configuration file.
To locate your PHP error logs, open the XAMPP dashboard by typing http://localhost into your browser’s address bar. There, click PHPInfo at the top of the screen: The PHPInfo link in the XAMPP dashboard. Then search for “error_log”.
Somehow PHP won't create the "logs" folder by itself... and that's what we need to do:
Created the "logs" folder in the correct location (for instance, C:\xampp\php\logs
).
Restart Apache using XAMPP control panel (stop and start).
Then when an error occurs the file will be generated fine and you'll be again able to open the PHP logs from XAMPP console
To test that it's working you can create a fatal error by using
trigger_error("Some info",E_USER_ERROR);
In my case I solved this problem by making the main settings made in the question, with only two changes:
track_errors=On
error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT
log_errors=On
change 1:
error_log="C:\xampp\php\logs\php_errors.log"
in the documentation it says that these methods are deprecated, so it is disabled by default and with the wrong directory.
change 2:
Create the folder 'logs' in: C:\xampp\php
This worked for me, I hope it will be useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With