wamp3.1.3 切换php版本错误

说明:

使用了几天phpstudy,对他的几个功能还是难以忍受。
1. 没办法更改快捷键Ctrl+Q,这个是navicat里面的查询,导致现在要查询,只能点击上面的按钮操作,很不方便。早期版本有,找遍新版本就没有这个选项。尝试更改windows的快捷键也是没办法。
2. 之前博客提到过,通过按钮添加虚拟主机,多加几个就乱了
3. mysql版本默认只有5.5,php, apache ,nginx 是各种版本用。为啥就这个不能升级下!!!
我放弃,回归使用wamp
重新使用wamp,找去官网上找,已经有新版本了。可以支持高版本php可以自动切换,mysql 版本也是5.7.19了。


wamp 3.1.3 切换php版本,重新打开会提示个错误。

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.

百度了好久也没看到啥,还是要google。这里也展示下百度,google返回的截图:
百度返回截图
google返回截图

点击google前几条查看就解决问题了,论坛回答很清楚:
是因为php到环境变量的问题,下面也解释了为什么不能这样。

As indicated, you do not need a path on a PHP version in the Windows PATH environment variable.
So you must remove this path from your environment variable.

Using paths on Wampserver's PHP or MySQL versions in the PATH environment variable is strongly discouraged or even prohibited.
Wampserver does not create any paths on PHP or MySQL versions. Wampserver does not use the paths declared in the PATH environment variable.
Using a path on Wampserver or on a version of PHP or MySQL is detrimental to the proper functioning of Wampserver and - for sure - will create problems for you in the future.
Using the PATH to launch applications is a survivorship of the past and it will cause you big problems if you change versions of PHP.
There is absolutely NO NEED to add anything into the Windows PATH because that will ALWAYS just cause you issues later when you change versions of either PHP or MySQL.

This was not checked in versions before version 3.0.3. It is now verified following the problems encountered by users when they wanted to change version PHP or MySQL. For example with a PATH on PHP version 5.6.34 makes that when we change version, for example PHP 7.2.0, this new version will use the php.ini of the PATH version, i.e. 5.6.34, so multiple errors and a non functioning of PHP.
This is because, by default, PHP or MySQL look for their configuration file (php.ini or my.ini) first in the PATH paths before looking in their own installation paths.

具体内容参考这个地址:http://forum.wampserver.com/read.php?2,150782,printview,page=1

猜你喜欢

转载自blog.csdn.net/hu_feng903/article/details/81259834