PHP (cli) version doesn't match XAMPP version I installed

为君一笑 提交于 2019-12-02 12:30:56
Shawn Northrop

It is possible to have multiple versions of php installed.

You will want to ensure that you are executing the php-cli that came with XAMPP.

It sounds like you have another version of php installed and is in your PATH so that when you run php that version is loaded.

You can use the where command to find out what file is being loaded. From the terminal type: where php

Anyways, you may want to remove that php file and possibly create a symbolic link in its place for the XAMPP version of php-cli

If you remove/rename the file and the new php-cli is not in your path, you will probably get an error as the system will not know what php is.

The solution to this is to uninstall all the xampp's that are installed and then fresh install xampp with php version > 7.

Everything should work fine then.

What happened to me was that I had installed xampp two times. One xampp on my C:// (version 5.6) and one xampp on my D:// (version 7.2)

When I did the command on my D:// xampp

php --version

It took the xampp php version from the C:// instead of the D://.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!