How can I get the version of PHP I put in later to run when I run PHP from the command prompt?Symptoms
I put php8.0.0 in windows10 by myself and the path was originally included
PHP 7.1.29 (cli) (built: May 1 2019 14:15:48) (NTS MSVC14 (Visual C ++ 2015) x86)
The version does not change from.
- Rename php-8.0.0 to php in C: \ php and save.
- Added C: \ php to the system environment variable Path.
A different version is displayed with php -v.
C: \ Users \ user>php -v PHP 7.1.29 (cli) (built: May 1 2019 14:15:48) (NTS MSVC14 (Visual C ++ 2015) x86) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
If i specify a directory and execute it, the desired version will be displayed.
C: \ Users \ user>C: \ php \ php -v PHP 8.0.0 (cli) (built: Nov 24 2020 22:02:57) (ZTS Visual C ++ 2019 x64) Copyright (c) The PHP Group Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
Answer # 1
Path is searched in order from the front, so if an exe with the same name is found before the added directory, that will be executed.
Please review the description of Path.
Answer # 2
Added C: \ php to the system environment variable Path.
It may be a problem of the additional position of (the higher the priority is at the beginning).
Put it before other PHP directories.
where phpResult of
- it will be different from the url expected when converting php urlencode
- php version upgrade
- php - i want to get the tweet with ios version of python, and paste the acquired second line
- value passed as get parameter in php does not enter $_session
- php - consider the paid version of ckediter5
- memcached doesn't work after php version upgrade
- php - mysql: whether to use different instance for each user
- i want to rearrange the latest version of old php programs!
- php - what version should i use when using laravel in practice?
- github - is it possible to fork to different version control hosting services for other people's projects?
- php - i want to pass the ssl version received via https when passing it to another server via http
- after upgrading the php version of the rental server from 58 to 74, composer stopped working on ssh connections
- php - about the version when developing using the framework
- php - the mobile version does not finish loading
- php - variables cannot be passed in laravel
- macos (osx) - only one ping can be passed between windows and mac
- how to change php version of sakura server for each domain
- add a delete function to the presentation version with php
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- i want to call a child component method from a parent in vuejs
- python 3x - typeerror: 'method' object is not subscriptable
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- xcode - pod install [!] no `podfile 'found in the project directory