简体   繁体   中英

PhpStorm - Configuring deployment remote server for debug

I want to debug in a remote server, which is, by the way, a Vagrant machine. Not really a remote server, but this has a peculiar setup: the shared host/vagrant machine folder isn't related to the web server files.

The server is configured with Zend Framework. I have, locally, to deploy to the machine the following folders (as Zend Framework structure):

/home/user/webStuff/web
  • Inside web: config, data, module, vendor and public folders
  • Inside public folder I have the index.php, which handles all server requests.

Following is the server deployment configuration: 部署配置1

When I press "Test SFTP Connection" everything is fine. When I press "Open", the website opens.

And here, is the "Mappings" tab on the deployment configuration

部署配置2

Everything seems OK, here. At least from my point of view. But when I test the settings, in Run -> WebServer Debug Validation , it gives me "Failed to collect files: Invalid relative file name". I've tried more settings, like placing /web/public in Web path, but with no success.

In Settings -> Languages & Frameworks -> PHP I have a good configuration for the server vagrantmachine.com, with XDebug version correctly displayed.

Also, I've placed the following in xdebug.ini:

xdebug.remote_connect_back = 1
xdebug.remote_enable=1

I've searched and tried a lot, but with no success. I'm no specialist in these server configuration things, but if you need any information, just ask.

"Deployment path on server" and "Root Path" were wrong. Like @Eugene Morozov said, I changed the root path to "/opt/webStuff" and deployment path to "/" and it worked out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM