Where can I find error log files for PHP?(在哪里可以找到 PHP 的错误日志文件?)
问题描述
在哪里可以找到错误日志文件?
我需要检查它们以解决安装 suPHP 后显示的内部服务器错误.
您可以使用 lsof 查找系统上打开的日志文件.lsof 只是为您提供所有打开文件的列表.
将 grep 用于日志"...再次为php"使用 grep(如果文件名包含字符串log"和php",就像在php_error_log"中一样,并且您是 root 用户,您将在不知道配置的情况下找到这些文件).
lsof |记录日志...剪gmain 12148 12274 用户 13r REG 252,1 32768 661814/home/user/.local/share/gvfs-metadata/home-11ab0393.loggmain 12148 12274 用户 21r REG 252,1 32768 662622/home/user/.local/share/gvfs-metadata/root-56222fe2.loggvfs-udis 12246 用户内存 REG 252,1 55384 790567/lib/x86_64-linux-gnu/libsystemd-login.so.0.7.1==>apache 12333 用户内存 REG 252,1 55384 790367/var/log/http/php_error_log**...剪
<块引用>
lsof |grep 日志 |grep php**apache 12333 用户内存 REG 252,1 55384 790367/var/log/http/php_error_log**...剪
另请参阅有关查找打开的日志文件的文章:查找 Linux 系统上打开的日志文件
Where can I find error log files?
I need to check them for solving an internal server error shown after installing suPHP.
You can use lsof to find open logfiles on your system. lsof just gives you a list of all open files.
Use grep for "log" ... use grep again for "php" (if the filename contains the strings "log" and "php" like in "php_error_log" and you are the root user you will find the files without knowing the configuration).
lsof | grep log
... snip
gmain 12148 12274 user 13r REG 252,1 32768 661814 /home/user/.local/share/gvfs-metadata/home-11ab0393.log
gmain 12148 12274 user 21r REG 252,1 32768 662622 /home/user/.local/share/gvfs-metadata/root-56222fe2.log
gvfs-udis 12246 user mem REG 252,1 55384 790567 /lib/x86_64-linux-gnu/libsystemd-login.so.0.7.1
==> apache 12333 user mem REG 252,1 55384 790367 /var/log/http/php_error_log**
... snip
lsof | grep log | grep php
**apache 12333 user mem REG 252,1 55384 790367 /var/log/http/php_error_log**
... snip
Also see this article on finding open logfiles: Find open logfiles on a Linux system
这篇关于在哪里可以找到 PHP 的错误日志文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在哪里可以找到 PHP 的错误日志文件?


基础教程推荐
- 找不到类“AppHttpControllersDB",我也无法使用新模型 2022-01-01
- 使用 PDO 转义列名 2021-01-01
- phpmyadmin 错误“#1062 - 密钥 1 的重复条目‘1’" 2022-01-01
- HTTP 与 FTP 上传 2021-01-01
- 在 CakePHP 2.0 中使用 Html Helper 时未定义的变量 2021-01-01
- PHP 守护进程/worker 环境 2022-01-01
- 如何在 XAMPP 上启用 mysqli? 2021-01-01
- 在 yii2 中迁移时出现异常“找不到驱动程序" 2022-01-01
- Doctrine 2 - 在多对多关系中记录更改 2022-01-01
- 如何在 Symfony 和 Doctrine 中实现多对多和一对多? 2022-01-01