简体   繁体   English

使用Laradock,“ display_errors”标志不起作用

[英]Using Laradock, the “display_errors” flag is not working

I have change "display_errors = off" to "display_errors = On " in php-fpm/php70.ini and laravel.ini , and restart the nginx and php-fpm ,but when I refresh the phpinfo page , it shows display_errors is still off. 我在php-fpm / php70.ini和laravel.ini中将“ display_errors = off”更改为“ display_errors = On”,然后重新启动nginx和php-fpm,但是当我刷新phpinfo页面时,它显示display_errors仍然关闭。 so I can't display the php errors on the page. 因此我无法在页面上显示php错误。
Could you tell me how to fix it ,thanks. 谢谢你能告诉我如何解决它。
I am using Mac. 我正在使用Mac。
And I found when I changed some configs in php70.ini, something is working , something is not working. 当我在php70.ini中更改某些配置时,我发现有些东西正在工作,有些东西却没有工作。 For example ,I changed the "display_startup_errors" from "Off" to "On",it worked and in phpinfo page it showed "On". 例如,我将“ display_startup_errors”从“ Off”更改为“ On”,它起作用并且在phpinfo页面中显示为“ On”。
Hope somebody could tell me Why? 希望有人能告诉我为什么?

Finally, I have found the reason. 最后,我找到了原因。 Because the laravel.ini doesn't reload. 因为laravel.ini不会重新加载。 I have modified display error from off to on in the laravel.ini in laradock/php-fpm/, and run docker-compose stop, then run docker composer up -d nginx mysql, but when I enter the php-fpm container, I find the laravel.ini still not change, it hasn't reload or Updated. 我已在laradock / php-fpm /的laravel.ini中将显示错误从关闭更改为开启,并运行docker-compose stop,然后将docker composer up -d nginx mysql运行,但是当我进入php-fpm容器时,我发现laravel.ini仍然没有更改,它没有重新加载或更新。
because the laravel.ini is load by ADD method in laradock/php-fpm/Dockerfile-70 line321: ADD ./laravel.ini /usr/local/etc/php/conf.d ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/ 因为laravel.ini是通过laradock / php-fpm / Dockerfile-70 line321中的ADD方法加载的:ADD ./laravel.ini /usr/local/etc/php/conf.d ADD ./laravel.pool.conf / usr /local/etc/php-fpm.d/

Answer ://github.com/laradock/laradock/issues/832 回答://github.com/laradock/laradock/issues/832

In my case it was necessary to execute the following command: 就我而言,有必要执行以下命令:

docker-compose up --force-create --build (nginx or apache) 

Hope this helps! 希望这可以帮助!

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

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