wrong PHP Path on Custom Server configuration

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

wrong PHP Path on Custom Server configuration

Postby Dirk L. » October 19th, 2018, 9:09 am

When I use a custom Server for my PHP Project (nginx) the Runtime PHP version is set to unknown.

When I now open a comand prompt or run the composer it uses PHP 5.6 even when my PHP project setting (Application tab) is set to 7.1
In the comand prompt I can see that the path 5.6 path was added before the regular path.
(When I use the IIS Express the PHP Version is correct)

How can I use nginx and make sure the project uses the PHP version from the Application setting?

Setup: VS Pro 2017, PHP Tools 1.29.10925, nginx, PHP 5.6, PHP 7.1 and PHP 7.2 installed, Project is Magento 2

Thanks for your help
Dirk L.
 
Posts: 2
Joined: October 19th, 2018, 8:39 am

Re: wrong PHP Path on Custom Server configuration

Postby mhpcc » October 19th, 2018, 10:52 pm

That's something you'll have to specify for the web server of your choice (nginx, apache, etc.) and not a setting in Visual Studio, I believe. When you use a custom web server and not IIS or PHP's built in web server, you'll be remote debugging the project (if even on the same machine).

Also keep in mind that nginx with FastCgi uses port 9000, so you'll have to specify a differnet xdebug port if you want to debug.
mhpcc
 
Posts: 5
Joined: October 19th, 2018, 10:46 pm

Re: wrong PHP Path on Custom Server configuration

Postby Dirk L. » October 26th, 2018, 12:56 pm

sorry I guess you got mo wrong.
I'm not talking about the php path for nginx. That's working fine.
Also the fastcgi is configured to an other port than 9000 in my nginx.conf

VS offers to open a command prompt that brigs you direct into the path where you open it. Unfortunately the path becomes changed by Php Tools.

When I use the build in Server the path is set to the configured PHP.
But when I use a custom Server it still changes the path but to the wrong PHP Version.
Dirk L.
 
Posts: 2
Joined: October 19th, 2018, 8:39 am


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 7 guests

cron

User Control Panel

Login

Who is online

In total there are 7 users online :: 0 registered, 0 hidden and 7 guests (based on users active over the past 5 minutes)
Most users ever online was 89 on October 15th, 2018, 4:06 pm

Users browsing this forum: No registered users and 7 guests
Phalanger