Varying-Vagrant-Vagrants / VVV

An open source Vagrant configuration for developing with WordPress
https://varyingvagrantvagrants.org
MIT License
4.54k stars 848 forks source link

xdebug_on is not in the environment path after updating to VVV 2.0, #1203

Closed salcode closed 6 years ago

salcode commented 7 years ago

Expected Behavior

After SSHing into my VVV environment, I expected running

$ xdebug_on

would activate xdebug.

Current Behavior

After SSHing into my VVV environment, running

$ xdebug_on

results in

xdebug_on: command not found

Possible Solution

Add /vagrant/config/homebin to the PATH.

Your Environment

LC43 commented 6 years ago

Just noticed the same, xdebug_on is not found, but running from /vagrant/config/homebin/xdebug_on works.

VVV version: Current HEAD master 710f085
Vagrant version: 2.0.0 VM Provider name: VirtualBox Operating System and version: Linux 4.13.4-1-ARCH

tomjn commented 6 years ago

@LC43 does this happen with the develop branch after a provision? /vagrant/config/homebin/ should be in PATH, can you get us the value of PATH?

LC43 commented 6 years ago

Uh, my bad, i was testing develop and just checked with user vagrant.

home/vagrant/bin is fully populated with xdebug_on/off.

PATH, as vagrant

vagrant@vvv:~/bin$ echo $PATH
/home/vagrant/bin:/usr/local/rvm/gems/ruby-2.4.1/bin:/usr/local/rvm/gems/ruby-2.4.1@global/bin:/usr/local/rvm/rubies/ruby-2.4.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/rvm/bin:/srv/www/phpcs/scripts/

I was trying to run as root, as i assumed this would be a system change, but is instead the script uses sudo. As root:

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

so, all good for me, maybe OP has it different.

tomjn commented 6 years ago

I'm unable to replicate using the vagrant user, I'm going to close this out, but if anybody encounters this with a freshly provisioned box on the develop branch or the latest master, please don't hesitate to reopen

Kluny commented 6 years ago

I got this one just now. /vagrant/config/homebin/xdebug_on worked for me as well.

Vagrant 2.0.1-master on Mac El Capitan using vagrant user. VirtualBox 5.1.30.

kmgalanakis commented 6 years ago

I got this one on the latest develop. I had to add /vagrant/config/homebin on the $PATH using

echo 'export PATH=$PATH:/vagrant/config/homebin' >> ~/.bashrc

why is this happening?

dingo-d commented 6 years ago

I have this as well. When I run it from /vagrant/config/homebin/xdebug_on I see 2 processes being run:

php7.1-fpm stop/waiting
php7.1-fpm start/running, process 13101
php7.2-fpm stop/waiting
php7.2-fpm start/running, process 13120

I added php71 as a utility but my php -v throws

PHP 7.2.5-1+ubuntu14.04.1+deb.sury.org+1 (cli) (built: May  5 2018 06:17:01) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.5-1+ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
DaveLak commented 6 years ago

Same issue here after upgrading from VVV 2.1.0 to VVV 2.2.1 and re-provisioning.

tomjn commented 6 years ago

/vagrant/config/homebin/xdebug_on is the location of the command and it's off equivalent

DaveLak commented 6 years ago

Yup, I see, thanks for the quick response. I just thought I'd confirm I can reproduce and add my specs in case it's ever useful.

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.