wrong PHP Path on Custom Server configuration
4 posts
• Page 1 of 1
wrong PHP Path on Custom Server configuration
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
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
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.
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: 22
- Joined: October 19th, 2018, 10:46 pm
Re: wrong PHP Path on Custom Server configuration
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.
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
Re: wrong PHP Path on Custom Server configuration
You can specify version in application `type` field like `"type": "php 5"`, or `"type": "php 7"`, or `"type": "php 7.0"`. Unit tries to match version against existing modules. If several versions match (e.g. 7.0.23 and 7.1.9 both match `php 7`), then the newest version will be used.
The same rule works if no version specified in the magento: the newest version against all existing modules is used
The same rule works if no version specified in the magento: the newest version against all existing modules is used
- BiztechCS
- Posts: 1
- Joined: January 3rd, 2019, 12:40 pm
- Location: India
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 50 guests