问题
I've been using XAMPP for Windows.
Where does PHP's error log reside in XAMPP?
回答1:
\xampp\apache\logs\error.log
, where xampp
is your installation folder.
If you haven't changed the error_log
setting in PHP (check with phpinfo()
), it will be logged to the Apache log.
回答2:
I found it in:
\xampp\php\logs\php_error_log
回答3:
You can also open the xampp control panel and click on the Button "logs":
回答4:
For mac users XAMPP Version 1.7.3
/Applications/XAMPP/xamppfiles/logs/error_log
回答5:
For any one searching for the php log file in XAMPP for Ubuntu, its:
/opt/lampp/logs/php_error_log
Most probably it will be having a big size (mine was about 350 mbs) and it slowed down my text editor after opening. If you do not care about all the past logs you can empty the file easily by simply going to the terminal and then writing these three lines one by one:
sudo su
cd /opt/lampp/logs/
> php_error_log
And newer logs will be easy and fast to open now.
Hope some Ubuntu user finds it helpful.
回答6:
This might be a simple case of the PHP error log being turned off.
回答7:
\xampp\php\logs
did not exist at all for me - for whatever reason.
I simply had to create a folder in \xampp\php\
called logs
and then the php_error_log
file was created and written to.
回答8:
Look in your configuration file and search for the error_log setting. Or use phpinfo() to find this setting.
回答9:
For my issue, I had to zero out the log:
sudo bash -c ' > /Applications/XAMPP/xamppfiles/logs/php_error_log '
回答10:
\xampp\apache\logs\error.log is the default location of error logs in php.
回答11:
By default 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. Maybe it could be a Windows account write permission problem? I am not sure, but I created the logs folder and php_error_log file manually and then php logs were logged in it finally.
回答12:
As said above you can find PHP error log in windows. In c:\xampp\apache\logs\error.log. You can easily display the last logs by tail -f .\error.log
来源:https://stackoverflow.com/questions/3719549/where-does-phps-error-log-reside-in-xampp