找到在Ubuntu服务器上记录PHP错误的位置?

时间:2022-10-28 15:01:24

I can't find the PHP error logs are on the ubuntu server.

我找不到PHP错误日志在ubuntu服务器上。

Checking phpinfo() has "no value" for error_log. If I run a locate error_log I get nothing for the domain I am working with. This site is on a shared server, so I'm not sure I'll be able to change anything in php.ini -

检查phpinfo()对error_log来说“没有值”。如果我运行一个locate error_log,那么我所处理的域就不会得到任何东西。这个站点位于一个共享服务器上,因此我不确定是否能够更改php中的任何内容。ini -

Where are the PHP error logs?

PHP错误日志在哪里?

3 个解决方案

#1


5  

This site is on a shared server

此站点位于共享服务器上

Then you need to ask your web host where the log file(s) are located.

然后,您需要询问web主机日志文件的位置。

It's entirely up to them where and how each virtual host has its logs written.

这完全取决于他们,每个虚拟主机在哪里以及如何编写日志。

#2


10  

Check the main Apache error log for the host:

检查主机的主要Apache错误日志:

/var/log/apache2/error.log

/var/log/apache2/error.log

#3


2  

Usually on shared servers where virtual hosts are concerned, each vhost has its own unique error_log and access_log files.

通常在涉及虚拟主机的共享服务器上,每个vhost都有自己唯一的error_log和access_log文件。

On some hosts, these are typically in your home directory under a folder called logs. If you don't see any directory in your home that looks like it stores logs, log into your hosting control panel and see if you can get access to them there. For example, cPanel has a section called logs, where you can find an item called Error Log which would show you the contents of the Apache error log for your virtual host.

在某些主机上,它们通常位于您的主目录下,位于一个名为logs的文件夹下。如果您在家里没有看到任何目录,看起来它存储日志,请登录到托管控制面板,看看是否可以访问它们。例如,cPanel有一个名为logs的部分,在这里可以找到一个名为Error Log的条目,该条目将向您显示虚拟主机的Apache错误日志的内容。

#1


5  

This site is on a shared server

此站点位于共享服务器上

Then you need to ask your web host where the log file(s) are located.

然后,您需要询问web主机日志文件的位置。

It's entirely up to them where and how each virtual host has its logs written.

这完全取决于他们,每个虚拟主机在哪里以及如何编写日志。

#2


10  

Check the main Apache error log for the host:

检查主机的主要Apache错误日志:

/var/log/apache2/error.log

/var/log/apache2/error.log

#3


2  

Usually on shared servers where virtual hosts are concerned, each vhost has its own unique error_log and access_log files.

通常在涉及虚拟主机的共享服务器上,每个vhost都有自己唯一的error_log和access_log文件。

On some hosts, these are typically in your home directory under a folder called logs. If you don't see any directory in your home that looks like it stores logs, log into your hosting control panel and see if you can get access to them there. For example, cPanel has a section called logs, where you can find an item called Error Log which would show you the contents of the Apache error log for your virtual host.

在某些主机上,它们通常位于您的主目录下,位于一个名为logs的文件夹下。如果您在家里没有看到任何目录,看起来它存储日志,请登录到托管控制面板,看看是否可以访问它们。例如,cPanel有一个名为logs的部分,在这里可以找到一个名为Error Log的条目,该条目将向您显示虚拟主机的Apache错误日志的内容。