![]() ![]() but to be on the safe side i would suggest Index index.html index.htm įastcgi_pass unix:/run/php/ Īs for php-fpm the main setting is log_errors = Onīasically it s enough. To get php-fpm errors in nginx error log you need:Īs for nginx: it s enough just basic config # cat default | grep -v "#" I don't really care where the errors end up, just that they end up somewhere.Īny clues on how I might get this to work? I've configured PHP to log to syslog, however FPM has no syslog function so it's logging to a file. nf :syslogtag, contains, "php" /var/log/php-fpm/error.log The only reason I know they're happening is failed responses and NewRelic catching stack traces.Įrror_log = /var/log/php-fpm/fpm-error.logĪccess.format = "%t \"%m %r%Q%q\" %s %Mkb %C%%" I'm running nginx as the reverse proxy to PHP-FPM, but I'm not seeing the various E_NOTICE or E_WARNING messages my app is producing. You can set php error log globally and locally.I'm trying to figure out where the PHP errors are going in my setup. You can see the php errors for an account under: /home/username/logs/domain_ This cheat sheet has been helpful in some situations, but I regret to have to admit it is not nearly universal. If the name without a path is not syslog, a frequent home for the file is is the document root of the website (a.k.a., website home directory, not to be confused with the home directory for your account). Even the name of the syslog varies by distribution. A common location is /var/log/syslog, but it can be anywhere. If it syslog, then the PHP error log is injected into the syslog for the server, which varies by Linux distribution. If there is a file name without a path, the location depends on whether the file name has the value syslog. Another likely spot is in a logs directory in your account home directory, ~/logs/error.log. If PHP is running as an Apache module, on Linux the log often is in /var/log/apache2/error.log. If it is, the log file location will depend on the operating system and the mode PHP is running. When there is not a full path, the location depends on: The trick is there usually is not a full path indicated in phpinfo(). If the output from phpinfo() shows a full path to a file, that is where the log is. Finding your way among them is confusing at first, but you do not need to deal with this to find your PHP log. ![]() Whatever the value is, it comes from the php.ini files used to configure PHP. The answers already posted in here mostly are making an unstated assumption that PHP is running as part of a web server. That is because the PHP interpreter that runs on a web server is not the same PHP interpreter that runs from the command line, even when the command line is on the same machine as the web server. If you do both, you likely will find the error_log is in different places, depending on command line vs. To view it, create a PHP file containing this:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |