PHP variable Path required in VSCode editor
Posted by: caydee (---.customer.vsm.sh)
Date: February 14, 2019 03:04PM

Hello RiggsFolly,

I am using both Sublime Text 3 and Visual Studio Code, but am having problems running PHP in VSCode as it requires one to declare the path to PHP in Environment which I have done. Now, when I use ST-3 and Wampserver, Wampserver shows an error:

Sorry,
There is an error.

There is Wampserver path (c:/wamp64) into Windows PATH environment variable: (C:\wamp64\bin\php\php7.2.4\php.exe)

It seems that a PHP installation is declared in the environment variable PATH
C:\wamp64\bin\php\php7.2.4\php.exe

Wampserver does not use, modify or require the PATH environment variable. Using a PATH on Wampserver or PHP version is detrimental to the proper functioning of Wampserver.


Is there any other way to configure PHP so that no errors are encountered?

"C:\wamp64\bin\php\php7.2.4\php.exe"---->>path directly from C:

"C:\\wamp64\\bin\\php\\php7.2.4\\php.exe" ---->>path set in the PATH Environment Variable

If I would use the batch file as you suggested on Stackoverflow, where would I need to place the batch file and would require that I also change the PATH in the Environment Variable? And would that not conflict with Wampserver?

[stackoverflow.com]

"PATH=%PATH% says create a new PATH environmant variable with the current path i.e. %PATH% plus the new directory we want to add to it. Windows searches folders in the PATH to find executables i.e. 'php.exe' that it cannot find in the current working directory. – RiggsFolly"

Caydee

IN ALL THINGS BE MEN
Windows 10 x64 | WAMP 3.3.2 - x64 | Apache 2.4.58 | MySQL 8.2.0 | PHP 8.2.13 | PHPMyAdmin 5.2.0

Options: ReplyQuote
Re: PHP variable Path required in VSCode editor
Posted by: RiggsFolly (Moderator)
Date: February 14, 2019 03:11PM

That message is just a warning, you can ignore it if you have to.

Not got any recent experience of Visual Studio I am afraid, so cannot be much more help with this

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: PHP variable Path required in VSCode editor
Posted by: Otomatic (Moderator)
Date: February 14, 2019 04:22PM

Hi,

I remind you that this is only a warning to warn those who would like to change PHP version regardless of the fact that the PATH will always point to the previous version and that the new version of PHP will take into account the php.ini of the old version.
This warning does not block or change anything about Wampserver.

When you have spent four days to find out why PHP 5.6.32 did not take into account the changes in its own php.ini, you will understand why this warning exists.

And, in addition, the Wamp settings allow you to no longer have this warning, but at your own risk.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.