9
votes

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.

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

1
What kind of system are you running on? Many have separate php.ini for CLI or web server. If that is the case, you can simply not enable it for the CLI.Michael Berkowski
Or, you can create a custom php.ini which doesn't load xdebug and call it with the -c flag. I don't think there's a command line flag to explicitly disable a single extension.Michael Berkowski
The php -n command should disable all extensions.kenorb

1 Answers

2
votes

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

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

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