0

I am very new to PHP and I am trying to update PHp version on windows server 2008 R2 having IIS. I checked the version by using command Line : PHP -v and it shows 5.4.And using PHP manager in IIS I changed the version to 5.6 and checked the site is working fine. But after updating the verison from PHP manager I checked in the command line (php -v) it still shows me PHP 5.4

My question is,what is the difference between the PHP version that is being displayed in the command line and in the PHP manager.

-If they are same then why it did not update the version at server level.

-If they are not the same then how can we make the PHP manager version and server level version same.

-Is it really necessary to update the version at server level as well or we can carry on by updating the version just at PHP manager.

PHP version after changing from PHP manager:

enter image description here

PHP version showing in the command line even after updating in IIS using PHp manager:

Updating the PHP path

Lex Li
  • 60,503
  • 9
  • 116
  • 147
johnWick
  • 13
  • 1
  • 4
  • Check that your PATH in your environment variables points to the new version and not the old. When that's done, restart the CMD window and try again. If it still doesn't work, restart the computer and try again. – M. Eriksson Sep 06 '17 at 06:29
  • You should remove the "wordpress"-tag since the question has _nothing_ to do with wordpress. Alos, remove the whole paragraph that starts with "Please reply to me..." since won't help you to get answers. It rather sounds a bit like: _"Just do as I say and answer!"_, which isn't a nice way of asking for help. – M. Eriksson Sep 06 '17 at 06:30
  • @MagnusEriksson removed – johnWick Sep 06 '17 at 06:34
  • @MagnusEriksson i have restarted the server i ll let u know if it updates now. thanks – johnWick Sep 06 '17 at 06:34
  • You didn't answer the initial question. Did you make sure that the PATH in the servers environment variables points to the correct version? (You must remove the path to the old PHP-version). – M. Eriksson Sep 06 '17 at 06:35
  • Yes I did. let me add the screenshot – johnWick Sep 06 '17 at 06:53
  • @MagnusEriksson can u pls check the image. Am i doing it right coz it dint update – johnWick Sep 06 '17 at 06:55
  • 1
    Please read my comments again: _"You must remove the path to the old PHP-version"_, which it doesn't looks like you did. – M. Eriksson Sep 06 '17 at 06:59
  • @MagnusEriksson I removed old version from IIS manager->Machine name->Handler mapping. Removed from control panel(win cache for 5.4).removed the folder from program files. and now I am getting error 'php is not recognized as internal or external command'when I write 'php -v' after setting up new path. – johnWick Sep 06 '17 at 07:31
  • Now its done. Thank u very much @MagnusEriksson for ur help. – johnWick Sep 06 '17 at 07:41
  • If you found the solution, post it as an answer and accept it. – Lex Li Oct 16 '18 at 02:36

0 Answers0