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.1.1 - x64 | Apache 2.4.33 | MySQL 5.7.21 | PHP 7.2.4 | PHP MyAdmin 4.7.9

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.1.8 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 6.3.10>

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 MySQL 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.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.39 - PHP 7.3.5/7.2.18/7.1.29/7.0.33/5.6.40 - MySQL 5.7.26 - MariaDB 10.3.15
Wampserver 3.1.9 64 bit - Apache 2.4.39 - PHP 7.3.5/7.2.18/7.1.29/7.0.33/5.6.40 - MySQL 5.7.26/8.0.16 - MariaDB 10.3.15
PhPMyadmin 4.8.5 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote


Sorry, only registered users may post in this forum.