Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Mappings won't work for me... pls help

Anonymous
2010-09-23
2013-09-11

  • Anonymous
    2010-09-23

    I have 2 machines: A Debian server and a Windows 7 64bit workstation.
    I try to use Notepad++ for remote PHP debugging on the Debian server and set up the DBGp like this:
    Remote Server. 192.168.0.109
    IDE-Key: debug
    Remote Path: /opt/lampp/htdocs
    Local Path c:\www

    My php.ini regarding Xdebug:

    xdebug.remote_autostart=0
    xdebug.remote_enable=on
    xdebug.remote_host=192.168.0.42
    xdebug.remote_port=9000
    xdebug.remote_handler=dbgp
    ;xdebug.remote_mode=req
    xdebug.idekey=debug

    In the Debugger Window I always get the error message:

    Unable to map remote: file:///opt/lampp/htdocs/index.php (ip: 192.168.0.109 ide-key: debug) Fallback to source.

    There is some communication taking place in RAW DGBP like this:

    Accept: 192.168.0.109
    Recv: <?xml version="1.0" encoding="iso-8859-1"?>
    <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///opt/lampp/htdocs/index.php" language="PHP" protocol_version="1.0" appid="17254" idekey="debug"><engine version="2.1.0"><![CDATA]></engine><author><![CDATA]></author><url><![CDATA]></url><copyright><![CDATA]></copyright></init>
    Send: source -i 1 -f file:///opt/lampp/htdocs/strandsandale/index.php
    Send: feature_set -i 2 -n max_depth -v 3
    Send: feature_set -i 3 -n max_children -v 15
    Send: feature_set -i 4 -n max_data -v 512
    Send: breakpoint_list -i 5
    Send: run -i 6


    Recv: <?xml version="1.0" encoding="iso-8859-1"?>
    <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="source" transaction_id="1" encoding="base64"><![CDATA></response>


    Recv: <?xml version="1.0" encoding="iso-8859-1"?>
    <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>
    Recv: <?xml version="1.0" encoding="iso-8859-1"?>
    <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>
    Recv: <?xml version="1.0" encoding="iso-8859-1"?>
    <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="4" feature="max_data" success="1"></response>
    Recv: <?xml version="1.0" encoding="iso-8859-1"?>
    <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="5"></response>


    Recv: <?xml version="1.0" encoding="iso-8859-1"?>
    <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="6" status="stopping" reason="ok"></response>
    Send: run -i 7

    But I can't see anything happen in Notepad++ and if I set a Breakpoint it won't work…

    I need clarification on how to get this working.

    Any help is highly appreciated.

    Greets from Germany,

    Nico.

     
  • Damjan Cvetko
    Damjan Cvetko
    2010-09-23

    Please try a map of:
    Remote Path: file:///opt/lampp/htdocs
    Local Path c:\www

    Best!

     

  • Anonymous
    2010-09-27

    I have the same problem

    Same OS :  Debian server and a Windows 7 64bit

     
  • Damjan Cvetko
    Damjan Cvetko
    2010-09-28

    Have you tried the suggestion? Adding "file://" in front of remote path?

    BEst

     
  • Scott Szretter
    Scott Szretter
    2010-10-15

    Did anyone find the answer?   I have the same issue, except Ubuntu 10 and Windows 7 64 bit

    I tried adding file:///var/www   and no difference
    Actually it is as if it is not even looking at that path.  I can type anything in there and it always shows the same error message/path.

     
  • Damjan Cvetko
    Damjan Cvetko
    2010-10-18

    Hi.
    I finally managed to setup an environment for testing again, and tried what was said above. I have no problems getting it to work.
    The debian box has samba and is sharing its /var/www that I mount on windows as a W:\
    My mappings are
    remote: file:///var/www
    local W:

    Then I open a file over web http://debian/test.php that is a /var/www/test.php on debian and that gets mapped to  W:\test.php in N++.

    What I noticed just now (doh) is that you have local path set to c:\… Thats a really strange mapping, as I would guess c: is your system drive, you should be accessing the linux drive somehow.

    Best

     
  • John Minkle
    John Minkle
    2011-08-30

    I was also able to get it to work with:

    remote: file:///var/www/html/vsite1
    and z:\vsite1

    z: being mapped to the /var/www/htm via samba
    It took me a L-O-N-G time to get this to work and can only guess that it didn't like trailing slashes or leaving out the file:// prefix, and that maybe exiting notepad and re-entering helped.

     
  • mike dee
    mike dee
    2011-08-30

    I'll map the remote to the web root of the samba share (file:///var/www/), and map the samba share to the server root (/) with:

    writable = Yes
    path = /

    that way any other projects/sites that I setup inside will automagically be debug aware, and I don't have to continue to play around with mappings

     
  • mike dee
    mike dee
    2011-08-30

    lol, wait, check that:

    I'll map the remote to the root of the samba share (file:///)

     

  • Anonymous
    2012-04-11

    Just on the stupid front… Make sure that "Bypass all mapping (local windows setup)" is unchecked.

     
  • You should type IP(not domain name)
    Switch off the \\\"Bypass\\\" button above
    Should type file:///var/www/or-whatever-pass-you-have
    And x: for windows path

     
  • webdbase
    webdbase
    2013-02-19

    I had the same problem. After spending 2 hour searching using Google, I found the solution by myself and it is very simple.
    I had:
    file:///some-dir/some-other-dir (remote)
    but it turned out the correct configitration was:
    file:///some-dir/some-other-dir/
    the last backslash is important

     
  • Daddy Cool
    Daddy Cool
    2013-04-30

    +1 to :   Make sure that "Bypass all mapping (local windows setup)" is unchecked.

    Please developper, could you put this option with the others ? Totally missed it the second/third/etc. time I've changed the config :/

     
  • flymike
    flymike
    2013-07-29

    I have read this thread in detail, but still cannot get past

    "Unable to map remote: file:///mnt/http/mypath/index.php (ip: 192.168.2.15 idekey: xdebug-fedora) fallback to source"

    with Fedora server and Win7 client.

    DBGp Config is:

    Remote Server. 192.168.2.15
    IDE-Key: xdebug-fedora
    Remote Path: file:///mnt/http/mypath/
    Local Path: x:\mypath\
    Bypass all mapping is unchecked
    Use SOURCE command is unchecked
    Break at fist line is checked

    I can edit x:\mypath\index.php with NPP+, so I know the Samba mapping is correct.

    I even looked at the source code for DBGpWinSocket.pas, and I can't see why this is failing. The warning I see is being emitted at line 327. So I figure the compare at line 308 must be failing, but I can't see how.
    This is driving me crazy. Can anyone help?

     
  • mike dee
    mike dee
    2013-09-10

    I'm not using the trailing backslash, here is a screenshot of my setup:

    http://imgbin.org/images/15022.png

     
    Attachments
  • mike dee
    mike dee
    2013-09-11

    just noticed that under Win7Pro that having the Windows Firewall/Public Network enabled causes the debugger to fail. If I turn the firewall off then all is well. Need to figure out which rule I need to massage. Also, I'm running Xdebug v2.2.3 on an Ubuntu VM and connecting remotely.

     
  • mike dee
    mike dee
    2013-09-11

    Windows Firewall fix:

    Control Panel\Network and Sharing Center

    Select "Windows Firewall" from link in lower left corner of the pane
    Click Advanced Settings
    Click Inbound Rules in the tree control
    Find Notepad++ in the list and select the Properties for the entry

    In the properties/Action section check "Allow the connection"

    I had 2 entries in the list, just repeated the properties change a 2nd time

    Fixed it for me