TASK [php : xdebug configuration file] failed during local development setup

Hi there,

I’m trying to get set up with Trellis for the first time. I’m following the Trellis docs step by step and have installed all the requirements without any apparent issues.

Following the steps on Local development setup I’ve edited my group_vars/development/wordpress_sites.yml and group_vars/development/vault files and then run vagrant up.

It goes fine until I get this error:

TASK [php : xdebug configuration file] *****************************************
fatal: [default]: FAILED! => {"changed": true, "failed": true, "msg": "Destination directory /etc/php/mods-available does not exist"}

NO MORE HOSTS LEFT *************************************************************

I’m hunting around trying to troubleshoot but so far can’t find anything.

Any help would be appreciated.

Thanks in advance,
Laurence

That’s strange. No errors happened before that?

First thing to try with development boxes is to just re-created them. vagrant destroy and then vagrant up.

Just to make sure it wasn’t a weird one time issue.

I"m having the same issue. I thought it was from messing with my PHP path, but I cleared my .bash_profile and it’s still doing it, even after updating ansible.

I went so far as deleting the trellis directory and starting from scratch with a new vagrant box and it’s still hanging up on the same error. Worked just fine last week, no changes since then.

I can confirm this is happening now for me as well on a new vagrant up of Trellis. Digging into it now :thumbsup:

Jup, same here
20 characters

Same here.
This is old but, these guys think this error msg was due to a version of PHP that was too new for their version of ubuntu: https://github.com/protobox/protobox/issues/37 maybe not the case here but worth a look.
I too had successfully used this same version of trellis 3 days ago, latest commit is 5 days ago.

This is actually a bug with the PHP ppa that Trellis and most other people use to install PHP on Ubuntu. See here: https://github.com/oerdnj/deb.sury.org/issues/280

Looks like some major problems came up today and are still being resolved. I’m not sure what we can do at the moment to fix this but I’m still looking into it.

1 Like

I’ve been investigating this too. It worked successfully for me yesterday, but today a co-worker had the same issue seen here. I used vagrant ssh to look at the files xdebug is looking for. /etc/php contains 5.6 and 7.0, not mods-available. mods-available exists in each of those subfolders.

On my working copy, /etc/php contains 7.0 and mods-available. I’m not sure how this difference happens.

Hope this helps

I’ve fixed the xdebug issue in Trellis: https://github.com/roots/trellis/pull/509

However there’s still an upstream problem with the php-memcached package. It can be commented out for now if you aren’t using it. Development doesn’t by default anyway.

4 Likes

Thanks for this super fast fix!
How would I pull this specific commit into my trellis clone if the roots/trellis repo is setup as the [remote "upstream"] and my own clone is the [remote "origin"]? Do have to use cherry-picking or fetch?
git fetch upstream c21db84a78757d1e9e66ed114a438256090666d7

The above is not working (this is all kind of new to me).
Thanks!

git fetch upstream

then git cherry-pick c21db84a78757d1e9e66ed114a438256090666d7 should work.

1 Like

Thanks that did work! After resolving the conflicts I was able to commit the changes snd push to my own repo.

The builds have finished and I’ve run vagrant up successfully with memcached not commented out anymore, with the PR swalkinshaw did. Thanks!

@erit thanks for confirming. It’s been fixed in the ppa: https://github.com/oerdnj/deb.sury.org/issues/280

1 Like

Wow I’m amazed by how quickly this was fixed thanks @swalkinshaw @erit [a]Twansparant

How can I get the fix? I removed the Git directory via git clone --depth=1 git@github.com:roots/trellis.git && rm -rf trellis/.git when I was following the Trellis docs - Installing Trellis

If you didn’t initialize your own repo after that, then you have to manually edit the changed files: https://github.com/roots/trellis/pull/509/files

It sounds like initializing my own repo is what I should do. I’d like to set up in the best way so I can pull the latest changes (fetch and cherry pick whatever’s required). Do I clone again, or init locally and then set up track the remote branch?

Sorry if this is going a bit off topic, I’m new to working with a repo like this.

I’m quit new to this too (so correct me if I’m wrong), but I think the best way is to git init locally and push it to your own (private) repo. After that you can add the remote upstream to fetch or cherry-pick changes:
git remote add upstream https://github.com/roots/trellis.git
See: https://help.github.com/articles/configuring-a-remote-for-a-fork/

1 Like

That’s great. Thanks @twansparent for the pointers.