如何禁用 PHP CLI 的 Xdebug 加载? [英] How to disable Xdebug loading for PHP CLI?

查看:47
本文介绍了如何禁用 PHP CLI 的 Xdebug 加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用作曲家,当我进行更新时.如果将 xdebug 加载到我的 php.ini 文件中,这将花费大量时间.

Im using composer, and when i do an update. It takes a huge chunk of time if xdebug is loaded in my php.ini file.

我怎样才能只为 cli 禁用 xdebug.所以作曲家不会花太多时间.但是我会启用 xdebug 吗?

How can i disable xdebug only for cli. So composer won't take as much time. Yet i will have xdebug enabled?

推荐答案

我通过为apache指定一个自定义的php.ini文件找到了答案,把原来的php.ini文件留给了cli.

I found the answer by specifying a custom php.ini file for apache, and left the original php.ini file for cli.

在您的 apache 配置文件中.只需编写以下代码.

in your apache configuration file. Just write the following bit of code.

<IfModule php5_module>
    PHPINIDir "C:/PATH/TO/CUSTOM/INI"
</IfModule>

这篇关于如何禁用 PHP CLI 的 Xdebug 加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆