简体   繁体   English

如何查看或记录docker官方php-fpm debian镜像的PHP错误?

[英]How can I view or log PHP errors with docker's official php-fpm debian images?

I'm hitting a http 500 error, I'd like to log or view the actual PHP error causing this issue. 我遇到http 500错误,我想记录或查看导致此问题的实际PHP错误。

How can I enable the log? 如何启用日志? I've looked around for a php.ini file but it does not seem to be present? 我到处寻找php.ini文件,但似乎不存在?

The specific image I'm using is php:7.1-fpm-stretch 我正在使用的特定图像是php:7.1-fpm-stretch

You may add your own .ini files in this path on the container: 您可以在容器上的以下路径中添加自己的.ini文件:

/usr/local/etc/php/conf.d

This path is indicated in the response to the php --ini command which you can run in a shell inside your container. 该路径在对php --ini命令的响应中指示,您可以在容器内部的shell中运行该命令。

You will have to restart the web server (ie the container) for your changes to take effect. 您必须重新启动Web服务器(即容器)才能使更改生效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM