How to find PHP errors on an Ubuntu server?

I can not find the PHP error logs on the ubuntu server.

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

Where are the PHP error logs located?

+5
source share
3 answers

This site is located on a shared server.

Then you need to set your web host where the log files are located.

It completely depends on where and how each virtual host writes its logs.

+5
source

Check the main Apache error log for the host:

/var/log/apache2/error.log

+10

, , vhost error_log access_log.

On some hosts, they are usually located in your home directory under a folder called logs. If you don’t see any directory in your house that looks like it stores logs, go to the hosting control panel and see if you can access them. For example, cPanel has a section called logswhere you can find an item with a name Error Logthat will show you the contents of the Apache error log for your virtual host.

+2
source

All Articles