Recently I installed XAMPP for doing local development on my Windows 7 machine. I honestly didn't think PHP was installed at all before hand. I installed the latest version of XAMPP and configured for php 5.6.24. I created some virtual hosts and everything seemed to work.
I was having an issue and I needed to confirm which version of PHP I was using so I opened up my command line and typed
PHP 5.4.25 (cli) (built: Feb 5 2014 21:19:58)
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:
whichcommand on linux. Apparently this is the command for windows. Here is a SO post about it: Is there an equivalent of 'which' on the Windows command line?
Anyways, you may want to remove that php file and possibly create a symbolic link in its place for the XAMPP version of
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