Configurable Web Root

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

Configurable Web Root

Postby fantasticjamieburns » January 7th, 2013, 2:05 pm

Hello,

Is there any way to specify the folder that is the web root when debugging?

In my Zend Framework 2 project (and most other frameworks) the site is accessed using:

Code: Select all
/public/index.php


I can specify that as the starting page and when debugging I am taken to:

Code: Select all
http://localhost/public/index.php


But what I really want is:

Code: Select all
http://localhost/index.php


So that my routes work correctly.

Jamie.
fantasticjamieburns
 
Posts: 44
Joined: September 10th, 2012, 10:33 am

Re: Configurable Web Root

Postby CFI » January 7th, 2013, 2:26 pm

In the project properties you can define a start URL. Thats how I am using it, as my webroot is also not the root of the project.
CFI
 
Posts: 66
Joined: December 13th, 2012, 1:29 pm

Re: Configurable Web Root

Postby Jakub Misek » January 7th, 2013, 3:05 pm

Hi,

As CFI noted, you can easily setup start page.

However change the web root to some project subfolder is not possible yet.
(For now you can only configure your own webserver to point to a custom folder, and use "Custom Web Server" instead of built-in PHP 5.4 or IIS Express.)

We will note this feature, and plan this into some future update.

Thanks
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Configurable Web Root

Postby CFI » January 7th, 2013, 3:22 pm

IMHO this is not really important as I think you should also use the target webserver (and PHP version and so on) during development.
I for example use the odd configuration of LightTPD under windows because of this as my target device (webinterface of an embedded device) runs it.

I had serveral problems in the past when using different tools for development and deployment, so I only recommend the built in webserver for small stuff or testing.
CFI
 
Posts: 66
Joined: December 13th, 2012, 1:29 pm

Re: Configurable Web Root

Postby fantasticjamieburns » January 8th, 2013, 2:51 pm

CFI:
Thanks - it is useful for debugging.
When I hit F5 I expect the app to work, which it may not if anything relies on an absolute web root path. We can debate the usefulness of making everything relative but the debugger should not decide where the web root is really.

Jakub:
Thanks - I will configure the custom web server for this and it would be great if that was a setting in the projects page at some point.
fantasticjamieburns
 
Posts: 44
Joined: September 10th, 2012, 10:33 am


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 14 guests

cron

User Control Panel

Login

Who is online

In total there are 14 users online :: 0 registered, 0 hidden and 14 guests (based on users active over the past 5 minutes)
Most users ever online was 297 on March 29th, 2024, 7:06 am

Users browsing this forum: No registered users and 14 guests