drupal-vm icon indicating copy to clipboard operation
drupal-vm copied to clipboard

Move towards consistent use of phpenmod/phpdismod

Open codexmas opened this issue 9 years ago • 2 comments

Issue Type

  • Feature Idea

Your Environment

Vagrant 1.8.6
VirtualBox 5.1.12r112440

Your OS

  • macOS (10.12.3)

Summary

Currently to profile with XHProf it is my understanding that the XDebug extension should not be loaded to prevent erroneous results. With the work I am doing I use XDebug frequently and XHProf intermittently. To be able to use the phpenmod/phpdismod command in Ubuntu to disable XDebug on the fly and then enable it again when done would be an ideal workflow.

Right now only some extensions can be enabled or disabled with those commands. The extras that are installed via DrupalVM appear to be incompatible.

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

The ftp extension however can be disabled and enabled without issue.

Would it be possible to have DupalVM setup the extras in the same way? Alternatively any suggestion on making changes like this without having to rebuild the environment just to run XHProf cleanly?

codexmas avatar Feb 17 '17 17:02 codexmas

@codexmas - eh... hmm.

See:

  • https://github.com/geerlingguy/ansible-role-php-xdebug/issues/22
  • https://github.com/geerlingguy/ansible-role-php-xdebug/issues/24
  • https://github.com/geerlingguy/ansible-role-php-xdebug/issues/34

I still don't like the whole enmod/dismod approach that Ubuntu uses, but I know that it can be convenient in some instances. Remember, though, that Drupal VM also works with other OSes where those things aren't present, so I wouldn't necessarily want to default to using mods-available, sites-available, and all those other weird Debianish things.

geerlingguy avatar Feb 17 '17 18:02 geerlingguy

Fair enough, I can muddle along with manual enabling/disabling through a script.

codexmas avatar Feb 17 '17 18:02 codexmas