2

I want to be able to turn on/off Xdebug a simple and fast way. To disable it I tried out phpdismod, but only results in a warning:

$ phpdismod xdebug
WARNING: Module xdebug ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module xdebug ini file doesn't exist under /etc/php/7.0/mods-available

How to get a PHP module disabled/enabled with phpdismod?


Environment: Ubuntu 14.04, nginx 1.4.6, PHP 7.0 FPM.

$ ls -l /etc/php/mods-available/ | grep "xdebug"
-rw-r--r-- 1 root root 743 Jul  1 16:16 xdebug.ini
$ ls -l /etc/php/7.0/mods-available/ | grep "xdebug"
$ ls -l /etc/php/7.0/fpm/conf.d/ | grep "xdebug"
lrwxrwxrwx 1 root root 34 Feb 17 23:08 20-xdebug.ini -> /etc/php/mods-available/xdebug.ini
$ ls -l /etc/php/7.0/fpm/conf.d/ | grep "xdebug"
lrwxrwxrwx 1 root root 34 Feb 17 23:08 20-xdebug.ini -> /etc/php/mods-available/xdebug.ini
$ ls -l /etc/php/7.0/cli/conf.d/ | grep "xdebug"
lrwxrwxrwx 1 root root 34 Feb 17 23:16 20-xdebug.ini -> /etc/php/mods-available/xdebug.ini
automatix
  • 14,018
  • 26
  • 105
  • 230

1 Answers1

0

I'm having the same problem with the docker-lemp-stack.

In the php70/Dockerfile, the PHP module configs line puts the local xdebug.ini file into /etc/php/mods-available/xdebug.ini (which you see in your setup).

I've amended the line from ...

ADD conf/mods-available/xdebug.ini /etc/php/mods-available/xdebug.ini

to ...

ADD conf/mods-available/xdebug.ini /etc/php/7.0/mods-available/xdebug.ini

and rebuilt the docker image

I now get the right handling for the env var which controls the xdebug.

So if you move the files to the right location you should be OK.

Richard A Quadling
  • 3,769
  • 30
  • 40