PHPStorm - Invalid descendent file name

前端 未结 3 1005
南笙
南笙 2021-02-20 10:17

I\'m attempting to sync my local PHPStorm project from my Windows 7 PC with my Ubuntu server.

When I try any kind of connection (e.g. \"Test SFTP connection\"), it fails

相关标签:
3条回答
  • 2021-02-20 10:48

    You have a file on your Ubuntu server with that C:\nppdf32Log\debuglog.txt name. YES -- it's on Ubuntu and YES -- it's actually a file name and not full path (Linux allows : and \ characters in file names).

    Unfortunately such file name is invalid on Windows and library used for SFTP communications in PhpStorm does not allow to process such files in any way (yes, it's valid as full path but not as file name alone).

    The solution is to connect to your SFTP using another program (e.g. FileZilla) and delete that file. After that you will be able to continue with PhpStorm built-in SFTP functionality.

    P.S.
    Such file is usually created by Firefox on Linux (google that file name for additional details).

    https://askubuntu.com/questions/144408/what-is-the-file-c-nppdf32log-debuglog-txt


    Jetbrains support suggested asking here

    That's odd (and hard to believe for me) -- they should know about such issue for sure -- you are not first who is facing the same error.

    In any case -- this is the ticket to watch after -- hopefully the used library (for SFTP communications) will allow handling such situations better in the future.

    http://youtrack.jetbrains.com/issue/WI-2449

    0 讨论(0)
  • 2021-02-20 11:00

    I had this same problem, but it was not due to Firefox and I wonder if the original asker might have made the same mistake I did in configuring his xdebug.

    As a newbie, in setting the value for xdebug.remote_log in my php.ini (actually in separate xdebug.ini), I used the windows file path to my project on my local machine. Why? Because the value called "remote_log", so I mistakenly thought it wanted the path on my windows machine, which I thought was very strange at the time. But I am new to remote debugging, so... Oops.

    Using windows path is wrong:

    xdebug.remote_log="C:\Users\Buttle\PhpstormProjects\xdebug_log.txt"
    

    And it results in:

    /var/www/myproject/C:\Users\Buttle\PhpstormProjects\xdebug_log.txt

    (the bolded part is the actual file name)

    This is right:

    xdebug.remote_log="xdebug_log.txt"

    And presumably results in:

    /var/www/myproject/xdebug_log.txt

    (the bolded part is the actual file name)

    It appears that Xdebug saves that log file inside of the folder where the requested php file came from (in my case, my project's index.php file).

    I imagine that if I enter an valid linux path, I might be able to put the file somewhere else. E.g.

    This might work:

    xdebug.remote_log="/var/www/xdebug_log.txt"
    

    So this solves 2 problems: 1.) why the heck doesn't xdebug log anything on its server (it does!) 2.) descendant file problem.

    0 讨论(0)
  • 2021-02-20 11:02

    I met with the same problem, but I included logging of errors (description here https://devnet.jetbrains.com/docs/DOC-1202) and I saw that I had created a file with incorrect name

    0 讨论(0)
提交回复
热议问题