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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 10:51:14  来源:igfitidea点击:

Where does PHP's error log reside in XAMPP?

phpapachexampp

提问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 xamppis your installation folder. If you haven't changed the error_logsetting in PHP (check with phpinfo()), it will be logged to the Apache log.

\xampp\apache\logs\error.logxampp你的安装文件夹在哪里。如果您没有更改error_logPHP 中的设置(使用 进行检查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

You can also open the xampp control panel and click on the Button "logs":

您还可以打开 xampp 控制面板并单击按钮“日志”:

enter image description here

在此处输入图片说明

回答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\logsdid not exist at all for me - for whatever reason.

\xampp\php\logs对我来说根本不存在 - 无论出于何种原因。

I simply had to create a folder in \xampp\php\called logsand then the php_error_logfile 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 中错误日志的默认位置。