VVV: XDebug could not open the remote debug file '/tmp/xdebug-remote.log'.
I get this error on every page load after running xdebug_on. It also shows up when running any wp-cli commands.
XDebug could not open the remote debug file '/tmp/xdebug-remote.log'.
I can temporarily fix it by running:
sudo chmod 666 /tmp/xdebug-remote.log
But the next time I reload vagrant and re-enable xdebug, it’s back how it was before. XDebug is working fine, it’s just this annoying error message.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 1
- Comments: 17 (10 by maintainers)
Commits related to this issue
- Make xdebug-remote.log world-writable Fixes #621. — committed to jjeaton/VVV by jjeaton 9 years ago
- Add the vagrant user to the www-data group for xdebug log access When running php (or phpunit) inside the VM rather than the web interface, an xdebug-remote.log access error would appear in some scen... — committed to Varying-Vagrant-Vagrants/VVV by jeremyfelt 9 years ago
- Add the vagrant user to the www-data group for xdebug log access When running php (or phpunit) inside the VM rather than the web interface, an xdebug-remote.log access error would appear in some scen... — committed to jb510/VVV by jeremyfelt 9 years ago
- Ensure the log file for xdebug is group writeable By default, the xdebug log file is owner writeable (www-data). When the vagrant user runs PHP inside the VM, say for `wp`, while xdebug is enabled, i... — committed to Varying-Vagrant-Vagrants/VVV by jeremyfelt 8 years ago
On Ubuntu head over to the php mods folder: cd /etc/php/7.0/mods-available
Edit the xdebug config file: sudoedit xdebug.ini
The first line in the file should be: xdebug.remote_log = /var/log/xdebug/xdebug.log
Edit it and tell the system to put the xdebug.log in the folder shared by your host and vm. I’m running vmware fusion on my mac and I’ve set “/mnt/hgfs/” as my host/vm shared folder. I edited my xdebug.ini to have it store the xdebug.log file in a subfolder of my shared folder. Important! You need to make sure the folder exists already or create it.
xdebug.remote_log = /mnt/hgfs/html/apache_logs/xdebug.log
This solves 2 problems: 1) It will get rid of the error and 2) It will put the log file into a folder shared with your host. You can look at the log file on your host OS without having to SSH over to your VM and figure out where the file is buried in the VM OS.
@pdewouters it should have been fixed in https://github.com/Varying-Vagrant-Vagrants/VVV/pull/970
It seems the file needs to be world writable to avoid the error message.
Even doing this:
Doesn’t work, which I thought would since php5-fpm runs under www-data, and that makes it group writable…