Can't publish when webroot is in a subdir

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Can't publish when webroot is in a subdir

Postby metal450 » July 9th, 2016, 6:21 am

Hi all,

Just evaluating PHP Tools for the first time. While it seems that one fundamental/critical feature is missing (save-to-server - viewtopic.php?f=21&t=1812), it also sounds like it's coming in the very near future, and since PHP Tools seems otherwise so fantastic, I figured I'd try to get by with "publish selected file" in the interim. However, I'm having difficulty getting it to work with my project layout.

Locally, my project is in i.e. C:\www.site.com, and the webroot is C:\www.site.com\htdocs. I've got "htdocs" filled in for "Web root" in the project properties, and all is identified properly (i.e. if I right click C:\www.site.com\htdocs\test.php and "Set as start page," it gets entered in the project properties as test.php - as expected).

On the server, my webroot is in /home/public_html/www.site.com.

The problem is if I setup the Site Path under Publish settings as "/home/public_html/www.site.com," any file I publish creates an extra htdocs folder under http://www.site.com; i.e. it seems to ignore the "web root" setting in the project properties. I tried to work around this by creating a symbolic link on the server, /home/htdocs -> /home/public_html/www.site.com, and changing the publish settings to just point to /home...but then the publish operation just fails ("Failure; Failure." appears in the output pane). So there doesn't seem to be any way to get this to publish.

The only solution I've found is to put the project itself in C:\www.site.com\htdocs (rather than C:\www.site.com) - that way it isn't aware of the \htdocs subdir. But that litters my webroot with all the project files, the PublishProfiles, etc. Yuck.

How can I get "publish" working (until save-to-server is implemented), without rearranging my directory structures (not feasible for a variety of reasons) and without polluting my actual webroots with all the new VS files, as described above? My expectation was that the "web root" setting would be respected by "publish" like it is by the debugger - but that seems not to be the case.

Using v1.9.8851.2013.

Thanks in advance
metal450
 
Posts: 23
Joined: July 9th, 2016, 5:53 am

Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 6 guests

cron

User Control Panel

Login

Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 guests (based on users active over the past 5 minutes)
Most users ever online was 151 on December 6th, 2020, 7:46 am

Users browsing this forum: No registered users and 6 guests