PHP 的错误日志在 XAMPP 中的什么位置?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3719549/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where does PHP's error log reside in XAMPP?
提问by Emanuil Rusev
I've been using XAMPP for Windows.
我一直在为 Windows 使用 XAMPP。
Where does PHP's error log reside in XAMPP?
PHP 的错误日志在 XAMPP 中的什么位置?
回答by Lekensteyn
\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.
\xampp\apache\logs\error.log
,xampp
你的安装文件夹在哪里。如果您没有更改error_log
PHP 中的设置(使用 进行检查phpinfo()
),它将被记录到 Apache 日志中。
回答by Hovercat
I found it in:
\xampp\php\logs\php_error_log
我在:
\xampp\php\logs\php_error_log
回答by boksa
For mac users XAMPP Version 1.7.3
对于 mac 用户 XAMPP 版本 1.7.3
/Applications/XAMPP/xamppfiles/logs/error_log
回答by Black
回答by Muhammad bin Yusrat
For any one searching for the php log file in XAMPP for Ubuntu, its:
对于在 XAMPP for Ubuntu 中搜索 php 日志文件的任何人,其:
/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:
很可能它会很大(我的大约 350 mbs),并且在打开后降低了我的文本编辑器的速度。如果你不关心所有过去的日志,你可以很容易地清空文件,只需转到终端,然后一行一行写下这三行:
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.
希望一些 Ubuntu 用户觉得它有帮助。
回答by Dave Everitt
This might be a simple case of the PHP error log being turned off.
这可能是PHP 错误日志被关闭的简单情况。
回答by Strainj1
\xampp\php\logs
did not exist at all for me - for whatever reason.
\xampp\php\logs
对我来说根本不存在 - 无论出于何种原因。
I simply had to create a folder in \xampp\php\
called logs
and then the php_error_log
file was created and written to.
我只需要在\xampp\php\
调用中创建一个文件夹logs
,然后php_error_log
创建并写入文件。
回答by greg0ire
Look in your configuration file and search for the error_log setting. Or use phpinfo() to find this setting.
查看您的配置文件并搜索 error_log 设置。或者使用 phpinfo() 查找此设置。
回答by redolent
For my issue, I had to zero out the log:
对于我的问题,我必须将日志归零:
sudo bash -c ' > /Applications/XAMPP/xamppfiles/logs/php_error_log '
sudo bash -c ' > /Applications/XAMPP/xamppfiles/logs/php_error_log '
回答by pushpendra yadav
\xampp\apache\logs\error.log is the default location of error logs in php.
\xampp\apache\logs\error.log 是 php 中错误日志的默认位置。