phpinfo() and "php -v" show different version

Problems with the Windows version of XAMPP, questions, comments, and anything related.

phpinfo() and "php -v" show different version

Postby innerfly » 10. December 2014 12:23

I have XAMPP 5.6.3 installed. When I check PHP version with phpinfo(), the version is correct 5.6.3. But when I type 'php -v' in windows command line, I get 'PHP 5.3.6 (cli) (built: Mar 17 2011 10:48:37)'. Because of this problem I can't install PHP framework via Composer, that need PHP version above 5.4. How can I fix it?
innerfly
 
Posts: 3
Joined: 10. December 2014 12:14
Operating System: Windows 8 64bit

Re: phpinfo() and "php -v" show different version

Postby Altrea » 10. December 2014 12:56

innerfly wrote:But when I type 'php -v' in windows command line, I get 'PHP 5.3.6 (cli) (built: Mar 17 2011 10:48:37)'. Because of this problem I can't install PHP framework via Composer, that need PHP version above 5.4. How can I fix it?

Where did you type in php -v?
If i type that in an XAMPP Shell command line window i get the following info:
Code: Select all
# php -v
PHP 5.6.3 (cli) (built: Nov 12 2014 17:18:08)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies


Did you install an standalone version of PHP on your system?
Does your PATH variable contain a php bin folder?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8293
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: phpinfo() and "php -v" show different version

Postby innerfly » 10. December 2014 13:33

Hello Altrea. I tried to run 'php -v' in XAMPP shell and get the same as your result - PHP 5.6.3 (cli) (built: Nov 12 2014 17:18:08). When I run it in the Windows commant prompt, I get PHP version 5.3.6.
innerfly
 
Posts: 3
Joined: 10. December 2014 12:14
Operating System: Windows 8 64bit

Re: phpinfo() and "php -v" show different version

Postby innerfly » 10. December 2014 13:34

Solved. I check the PATH variable and it contains: C:\Program Files (x86)\Drush\Php; C:\xampp\php;
So I have installed Drupal shell with own PHP 5.3.6 version.
Thank you for help!
innerfly
 
Posts: 3
Joined: 10. December 2014 12:14
Operating System: Windows 8 64bit

Re: phpinfo() and "php -v" show different version

Postby Altrea » 10. December 2014 14:08

You are welcome 8)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8293
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 41 guests