概述
To disable xdebug for PHP-FPM and CLI (all use cases, in fact):
sudo php5dismod xdebug
sudo service php5-fpm restart
To disable xdebug specifically for PHP-FPM:
sudo php5dismod
-s fpm xdebug
sudo service php5-fpm restart
The “SAPI” fpm (defined with -s fpm) relates directly to modules found in /etc/php5/fpm/conf.d. CLI-specific modules are found in /etc/php5/cli/conf.d/
All modules inside of cli/conf.d and fpm/conf.d are symlinks (aliases) to modules in /etc/php5/mods-available.
This is Ubuntu/Debians convention as a means for enabling modules for each use case (each SAPI) indivisually. There is a separate php.ini configuration and separate set of modules loaded in CLI, FPM and (altho not applicable with Forge) Apache’s mod_php.
This will be the best way to accomplish your goal, as @dabernathy89’s reply doesn’t take into account Ubuntu/Debian’s way of handling the loading and configuration of modules and @thepsion5’s method will mean you have more code in your code base which is server-specific. (Not to trash your replies, but I think they’re likely to be more confusing! :D <3 )
如果你在debian,ubuntu上面用php7的话,稍稍有些不同:
$ sudo phpdismod xdebug
$ sudo service php7.0-fpm restart
https://laracasts.com/discuss/channels/forge/disable-xdebug
最后
以上就是糟糕发夹为你收集整理的关闭xdebug的全部内容,希望文章能够帮你解决关闭xdebug所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复