25

Prerequisites

  • Web server with PHP and xdebug. htdocs directory shared via NFS.
  • Developer machine running emacs with geben. Files edited via NFS mount of server htdocs directory.

The problem

When debugging PHP web applications with emacs and geben, the web app's files that are opened are not the local files but "dummy" files that represent the file contents on the server.

The main problem I have with that is that I can't directly edit the files because I'd change them on the server, which causes several things:

  • changing a temporary file causes emacs to ask me for ssh login credentials
  • changing a temporary file, emacs wants to reload the original open files because they changed
  • jump marks are not available on the temporary files

Ideally, a mapping of remote paths to local paths would need to be setup, but I think that's currently not possible with geben. Are there solutions to this problem?

cweiske
  • 30,033
  • 14
  • 133
  • 194
  • I know this question is old, but I'm struggling with this right now. Any update would be nice. – Florian Margaine May 02 '13 at 15:27
  • I've not found a solution. – cweiske May 02 '13 at 15:36
  • can't find a way of doing that. I have Apache running inside a docker container, so Geben sees it as another host, but in fact it's a local directory mounted. Best way so far is to install an ssh server inside docker container and configure ssh keys to avoid login credentials. – lfagundes Jul 12 '17 at 17:13

1 Answers1

1

I am not sure what OS you are using, but you may have more success using sshfs, as it seems that that is what you are using to connect to the remote server.

Try setting up your ssh with a private key. That way you will not get asked for the password so much.

Tom Macdonald
  • 6,433
  • 7
  • 39
  • 59
  • ssh has absolutely nothing do do in here. I explicitely said that I use NFS, and apart from that geben opens a dummy file regardless of the underlying filesystem type. – cweiske Nov 05 '13 at 08:21
  • Interesting. Why this then: "changing a temporary file causes emacs to ask me for ssh login credentials"? – Tom Macdonald Nov 05 '13 at 08:36
  • because emacs/geben knows that it's a remote server and assumes that you can ssh into the server to modify the file. This is the behavior I don't want - I want the remote-to-local mapping. – cweiske Nov 05 '13 at 09:17