environment variable PATH error
Posted by: jim_w (---.static.chello.nl)
Date: April 30, 2018 04:28PM

Hi,

After the instal of wamp. I got this error:

Sorry,

There is an error.

It seems that a PHP installation is declared in the environment variable PATH
C:\Program Files (x86)\PHP\v5.6

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.


Press ENTER to continue...


The weird thing about this error is that I already deleted the path.
Can someone help me?

Options: ReplyQuote
Re: environment variable PATH error
Posted by: RiggsFolly (Moderator)
Date: April 30, 2018 04:35PM

Hi,

I assume you mean you remove the `C:\Program Files (x86)\PHP\v5.6` from the Windows PATH.

How did you do this? As I have to assume you did not do it correctly.

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <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: environment variable PATH error
Posted by: jim_w (---.static.chello.nl)
Date: May 01, 2018 11:25AM

Hi,
Thanks for the quick reply!

This is where I found the PATH:
settings>advanced system settings> enviroment variables..> user variables for jim

Did I delete it correctly?

Options: ReplyQuote
Re: environment variable PATH error
Posted by: RiggsFolly (Moderator)
Date: May 01, 2018 11:36AM

Hi,

That sounds good. Did you also check the "System Variables" section, on the same dialog as "user variables for jim"?
It may also have been added in there.

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <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: environment variable PATH error
Posted by: jim_w (---.static.chello.nl)
Date: May 01, 2018 01:32PM

Thanks for your help!
There was another path which was not called wampserver.
The error is gone, but a new one occured.
The icon is orange and 2 of 3 server are running. I think it is the apache server, because the stop service button can not be selected. Only the start service.

Do you know what the problem could be?
I searched on the forum but I couldn't find a topic about this.

Options: ReplyQuote
Re: environment variable PATH error
Posted by: RiggsFolly (Moderator)
Date: May 01, 2018 02:33PM

Did you try checking the Ports usage?

Normal reason for APache not starting is that IIS is running and that autostarts and grabs post 80


Try

RIGHT CLICK wampmanager->Tools-> test Port 80

and if you cannot understand the output in the Command window that opens copy and paste it in here

please avoid chnaging Apache to Listen on another port, it can be done but it just causes more hassle later.

If it is IIS and you are not intending to use it, then I suggets you uninstall IIS from the "Add remove Windows Features"

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <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: environment variable PATH error
Posted by: jim_w (---.static.chello.nl)
Date: May 01, 2018 02:57PM

The icon is finally green!

For people that have the same problem follow this link: [stackoverflow.com].

Options: ReplyQuote
Re: environment variable PATH error
Posted by: Klopfer (---.dynamic.kabel-deutschland.de)
Date: May 14, 2018 03:46PM

Is there any chance that WampServer will just ignore the PATH variable in future versions? WampServer doesn't like it, but I had to set it because some composer scripts relied on it.

Options: ReplyQuote
Re: environment variable PATH error
Posted by: RiggsFolly (Moderator)
Date: May 14, 2018 04:10PM

You dont have to set the Windows PATH,
its very bad to do so.
And there is an easy way of achieveing this with flexibility in the version of PHP that you want to use without amending the Windows PATH

Remember WAMPServer can have MULTIPLE versions of PHP available in the wamp folder, you dont want to be locked in by Setting the PATH.

I personally use a little batch file that I store in a folder that is already on the Windows PATH

See StackOverflow answer to save me reentering it here

Or Here on the WAMPServer Forum if you prefer

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <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: environment variable PATH error
Posted by: Otomatic (Moderator)
Date: May 14, 2018 05:04PM

Hi,

> Is there any chance that WampServer will just ignore the PATH variable in future versions?

Already, it is only a warning and that does not prevent you from using the PATH, survivorship of the past, whereas there are ways to do without it as RiggsFolly indicated to you.
Then, if you were a little curious, you could have seen that there is, in the Wampserver settings (Right-click) an item to disable the PATH environment variable test.
In the end, this warning will never be disabled by default in future versions of Wampserver.

But don't complain about a Wampserver malfunction if you put paths on PHP versions in the PATH environment variable.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.3 32 bit - Apache 2.4.33 - PHP 7.2.5/7.1.17/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.2.15
Wampserver 3.1.3 64 bit - Apache 2.4.33 - PHP 7.2.5/7.1.17/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.2.15
PhPMyAdmin 4.8.0.1 - 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
Re: environment variable PATH error
Posted by: Klopfer (---.dynamic.kabel-deutschland.de)
Date: May 15, 2018 03:42PM

Thanks for the tip with the batch file. But...

RiggsFolly Wrote:
-------------------------------------------------------
> Remember WAMPServer can have MULTIPLE versions of
> PHP available in the wamp folder, you dont want to
> be locked in by Setting the PATH.


Why would that happen? If you specify the full path to the binary, Windows doesn't care about the path variable.
I've just tested that. If I specify the php.exe in the folder with version 5.3.6, than that PHP version is used although the path variable is linked to version 7.2.5.

Wampserver should have no problem with the path variable at all.

Options: ReplyQuote
Re: environment variable PATH error
Posted by: RiggsFolly (Moderator)
Date: May 15, 2018 03:59PM

Hi Klopfer,

Yes if you want to remember the complete path all the time then thats fine.

But if you dont want to have to enter the whole thing, setting it TEMPORARILY (for the life of a command window) onto the PATH is the way to go

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <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: environment variable PATH error
Posted by: Otomatic (Moderator)
Date: May 15, 2018 04:29PM

Hi,

> If you specify the full path to the binary, Windows doesn't care about the path variable.

Be interested in the search order of the php.ini file by PHP itself.
PHP first looks in the Windows folder, then in the paths defined in the PATH environment variable before going to see in its own folder or in the Apache bin folder.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.3 32 bit - Apache 2.4.33 - PHP 7.2.5/7.1.17/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.2.15
Wampserver 3.1.3 64 bit - Apache 2.4.33 - PHP 7.2.5/7.1.17/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.2.15
PhPMyAdmin 4.8.0.1 - 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.