26

My wamp server icon is currently orange, which means only 2 out of 3 servers are running. I can not open my phpmyadmin page because it gives 404 not found error. if I right click on my wamp icon at the bottom I get an error saying Error: C:/wamp64 or PHP in PATH. If I click on this error then a command prompt window appear saying this:-

Sorry,

There is an error.

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

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

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...
Epic
  • 269
  • 1
  • 3
  • 3

5 Answers5

44

To repress this error notification: right-click on System Tray wampserver icon and hover on "Wamp Settings" >> select "Do not verify PATH"

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Milson
  • 1,525
  • 3
  • 15
  • 29
12

As indicated, you do not need a path on a PHP version in the Windows PATH environment variable.

  • Control Panel
  • System
  • Advanced system settings
  • Environment Variables button
  • System variables
  • Select PATH
  • Modify Select C:\wamp64\bin\php\php7.2.4
  • Press OK
lomelisan
  • 908
  • 10
  • 15
Saeed.Gh
  • 1,285
  • 10
  • 22
  • 1
    What if I don't see C:\wamp64\bin\php\php7.2.4 in my PATH? – Spencer Shattuck Mar 02 '20 at 21:55
  • 2
    wamp itself does not add php to path variable and does not need it, some times installing other applications like composer adds php to path variable, you can find and remove it. it is a path pointing to a php version in your wamp folder. But if you need it in path variable follow @Milson solution – Saeed.Gh Mar 03 '20 at 02:36
  • @Saeed.Gh, yes composer added the path, but if I remove it would composer work properly?? And Laravel too?? – ikmazameti Jan 19 '22 at 12:36
  • to use whatever uses php in command line, you need to directly mention php full path like "E:\xampp\php\php -v" or add php to path variable and simply use "php" like "php -v" – Saeed.Gh Sep 25 '22 at 13:27
4

I meet the same issue. Maybe it's because your port 80 is used by other programs you don't need to add path just change your port 80 -> 8080

miken32
  • 42,008
  • 16
  • 111
  • 154
Duch Noun
  • 41
  • 2
  • 1
    Yes! Rightclick -> tools -> use port other then 80 -> 8080 made my wampserver icon green from orange, and http://localhost:8080/ work, though the error is showing still in the menu – Fanky Mar 01 '22 at 10:07
1

If you use Composer commands, you need to add PHP path in the Windows PATH Environment Variable. Otherwise, you don't.

I am using Laravel framework and usually install packages by command lines. I have to keep PHP path in WEV although WampManager told me that error.

You should be careful on checking PHP version. The http://localhost/ will give you the PHP version selected by WampManager. If you use command line "php -v", it will give you the version added in Windows PATH.

Tommy Hoang
  • 157
  • 8
  • NEVER add anything related to WAMPServer to the path [See](https://stackoverflow.com/a/16289254/2310830) – RiggsFolly Dec 09 '22 at 01:21
  • @RiggsFolly Could you explain more why NEVER? The your referral answer is too pro for this question. Is it neccessary locally? – Tommy Hoang Dec 10 '22 at 03:10
  • 1
    Because in WAMPServer you can have multiple versions of PHP available at the click of a wampmanager menu, putting anything hardcoded on the PATH is, 1) unnecessary and 2) it causes more hardship that anything else. Eveny time I change the version of PHP I want to use I also have to change the Windows configured path. – RiggsFolly Dec 10 '22 at 03:14
-1

I had the same problem. I removed php from PATH but I still got the warning. Turns out this check for php is rather dumb. It seems any php string is considered For me it was phpstorm variable that got flagged and it was just a leftover. Phpstorm wasn't actually installed on the system anymore.

IMHO there's no point bothering about this warning. If you need php available in the console then have it in your PATH and simply disable the check like Milson suggests. In newer version this option was moved in context menu to [Wamp settings] > [Automatic cleaning] > [Caution: Risky! Only for experts]

Also this php in PATH warning is not the cause for services not starting. Sometimes it does take quite a long time (~1 minute) but starts eventually. If that doesn't happen, then use each check provided by wampserver for any misconfiguration or missing library:

enter image description here

Sharak
  • 888
  • 8
  • 17