Найти версию PHP в командной строке windows
Я просто попытался узнать версию моего PHP из командной строки windows, C:> php -v Но это не работает. Тут написано php is not recognized as internal or external command .
14 ответов
в командной строке введите ниже
где C:\path\to\php является ли папка, где ваш — это. После этого беги
чем вы увидите что-то вроде
PHP 5.4.9 (cli) (built: Dec 12 2012 07:06:13 )
вам просто нужно узнать, где находится ваша папка с PHP.
- Если вы используете XAMPP или WAMP, вы увидите папку php.
- вам просто нужно войти в папку php, используя cmd с помощью команды
cd \xampp\php (для XAMPP)
cd \wamp\php (для WAMP)
PHP 5.6.11 (cli) (built: Jul 9 2015 20:55:40) Авторское право (c) 1997-2015 группа PHP Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
скорее всего, php не находится в указанном Вами пути.
попробуйте выполнить команду php с полным путем, например:
C:\> «C:\Program Files\php\php.exe» -v
обратите внимание, что это всего лишь пример, ваша установка php может быть в другом каталоге.
- Сначала откройте cmd
- затем перейдите в PHP папок, предположим, что в папке PHP в папке XAMPP на диск C. Ваша команда тогда будет:
это должно дать следующие результаты:
PHP 7.2.0 (cli) (построен: 29 ноя 2017 00:17: 00) (ZTS MSVC15 (Visual C++ 2017) x86 ) Copyright (c) 1997-2017 группа PHP Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
Я сам загрузил видео youtube о проверке версии PHP через командную строку в Bangla:https://www.youtube.com/watch?v=zVkhD_tv9ck
для начинающих на любой php, он обычно хранится в папке C:/ path вашего ПК (Мой компьютер).
==На Windows==
1.Нажмите кнопку Меню Пуск
2.Тип cmd и нажмите enter, чтобы выбрать первую программу / приложение, которое отвечает на ваш результат поиска.
Появится терминал черного окна, это известно как Интерпретатор Командной Строки
3.В окне терминала (приложение) введите cd c: и нажмите enter
4.Теперь введите в PHP -в и нажмите enter
и viola там у вас будет текущая версия php, которая установлена на вашем компьютере
легкий способ: Просто скопируйте файл cmd.exe от c:/windows/system32 / и вставить его в C:\xampp\php\ и запустить его, когда cmd открывает тип «php-v» без кавычек и нажимает enter. вы получите свою версию PHP.. спасибо
панель управления xampp — >оболочка — >тип php-v вы получаете версию php вашего XAMPP установлен
DB(mariadb/mysql)версия введите localhost/phpmyadmin в url нажмите enter нажмите на SQL тип выбрать версию(); введите, чтобы получить версию mysql или mariaDb
для меня путь PHP, пройденный из рнр5.6.25 (или php7) папка установки, через папку wamp, bin и php.
How to Update Change PHP Version in XAMPP
While using XAMPP for web development, there can be a point when you may require to update or change PHP version or say MySQL version in order to obtain some specific result. In this tutorial for beginners, I will show you how to change PHP version in XAMPP that too without reinstalling XAMPP.
To update the PHP version in XAMPP, you don’t have to reinstall XAMPP. Rather you can change PHP version by following a few simple steps explained below. And this approach saves you a lot of time and effort you may have consumed in reinstalling XAMPP. And those who still struggling about how to install XAMPP would surely find this article helpful. The PHP version requirement varies with the project specifications. You may need to employ a different version of PHP in XAMPP for one of your particular project.
Now I will show you how quickly you can check PHP version in XAMPP. Also, how to update PHP version in XAMPP and change PHP version XAMPP. Check out what is php? Let’s get started !!
How to Change PHP Version XAMPP
As we know XAMPP is an open source solution that serves as a local web server to develop and test PHP projects. And every project has its own requirement of PHP as well as MySQL version and you are bound to set up the required versions so as to get the desired results. The latest version of PHP 7 has come up with incredible features and compatibility. If you are planning to reinstall XAMPP (thinking to make it compatible with the latest or the previous version of PHP) then you should have the clarity of method. And the process of reinstalling XAMPP comprises the following:
- phpMyAdmin back up
- Copying htdocs files
- Copy the php.ini file content (required ones)
- Take back up of the entire XAMPP folder in a new folder.
- Delete older XAMPP (after back up)
Be extremely careful while backing up required data and deleting older XAMPP in order to install the new one.
Certainly, you won’t prefer to get caught up in this intricate situation where you’re likely to lose data. And the chances of losing data are greater if you make any mistake. Hence, no room for negligence and unprepared actions.
However, this makes sense to omit this crucial sitch by opting the other feasible solution that will help you update PHP version XAMPP in a few simple steps.
Steps to Update PHP Version in XAMPP
Step 1: First off download the needed version of PHP from https://windows.php.net/download#php-7.0 and unzip the folder and name it. Make sure you don’t name it something confusing with simple PHP. And now extract the content of the zip file.
Step 2: If there’s any custom configuration in the php.ini file, then you need to copy and replace the entire content with the new one. However, if you haven’t made any changes to this file then you can skip this step.
Step 3: Now, open the XAMPP server. And click on the ‘Config’ button in the Action column parallel to Apache. Now you can see the configuration files of Apache, open the “httpd-xampp.config” from here.
Step 4: Go to PHP-Module section, and comment the following lines of code and add the new two lines instead.
# # PHP-Module setup # #LoadFile “C:/xampp/php/php5ts.dll” #LoadModule php5_module “C:/xampp/php/php5apache2_4.dll” LoadFile “C:/xampp/php/php7ts.dll” LoadModule php7_module “C:/xampp/php/php7apache2_4.dll”
That’s all. Simply restart the XAMPP and you’re good to go.
Now, you are ready to Change PHP Version in XAMPP
So this is how you can check PHP version in XAMPP and also update PHP version in XAMPP hassle-free. Since PHP is the foundation of any project so you need to keep it updated all the time. And XAMPP, on the other hand, it yields you the platform to test your project with ease. In case you have an old installation of XAMPP that is messed up with lots of file, you may refer to this article in order to completely update XAMPP. If you are a beginner, then the chances of getting stuck in the web development process are higher. Whereas, using a website builder can help you achieve that in no time. And if you’re using TemplateToaster website builder software then you don’t have to bother about anything. It is one of the strongest website builders present in the market. Try it to believe it!! And don’t forget to share your experience with me in the comments below. Also, if you need any support or face any issues, while XAMPP change PHP version, then do let me know.
Как проверить версию XAMPP в Windows?
В Linux все просто. Я просто набираю / opt / lampp / lampp status, и он говорит мне о версии XAMPP.
Version: XAMPP for Linux 5.6.35-0 Apache is running. MySQL is running. ProFTPD is running.
Какая команда эквивалентна для XAMPP в Windows?
7 ответов
Откройте панель управления XAMPP, нажмите кнопку «Справка», а затем «View ReadMe» . Откроется файл «Блокнот» с первой строкой в виде:
«###### ApacheFriends XAMPP Version xyx ######»
Перейдите к удалению программного обеспечения, если вы работаете в Windows, и там вы увидите версию вашего xammp.
На панели управления XAMPP рядом с модулем MySQL нажмите «Стоп», затем «Пуск», затем «Журналы» и прокрутите до последней записи. Последняя строка будет выглядеть примерно так: 2018-09-27 10:38:04 17812 [Примечание] c:\xampp\mysql\bin\mysqld.exe: готов к подключению. Версия: ‘10.1.31-MariaDB’сокет: »порт: 3306 бинарный дистрибутив mariadb.org
Неловко — но единственный способ найти это.
Моя версия XAMPP — 3.2.4, и вы можете найти версию вашего xampp в верхней части панели управления.
Чтобы проверить версию компонентов xampp:
- Для Apache:
- Перейдите туда, где вы установили xampp и откройте папку xampp.
- Обходит через следующие папки:
xampp -> apache -> bin -> щелкните правой кнопкой мыши на httpd.exe -> параметр Properties -> вкладка Details
- Проверьте версию файла, как показано на следующем экране:
- Если вы хотите использовать оболочку XAMPP, перейдите на панель управления xampp и нажмите кнопку Shell в черном цвете справа, после ее открытия введите следующие команды, чтобы проверить версию для каждого apache, php и mysql:
- для типа Apache: httpd -v
- для типа PHP: php -v
- для типа mysql: mysql —version , и это будет отображать вашу версию MariaDB тоже.
Версия пакета Xampp также находится в файле properties.ini, а не только в файле readme.
Содержимое properties.ini :
C:\xampp>type properties.ini type properties.ini [General] installdir=C:\xampp base_stack_name=XAMPP base_stack_key= base_stack_version=7.3.23-0 base_stack_platform=windows-x64 .
Содержимое readme_en.txt :
C:\xampp>type readme_en.txt ###### ApacheFriends XAMPP Version 7.3.23 ###### Important! PHP in this package needs the Microsoft Visual C++ 2015 Redistributable package from http://www.microsoft.com/en-us/download/. Please ensure that the VC++ 2015 runtime libraries are installed on your system. + Apache 2.4.46 + MariaDB 10.4.14 + PHP 7.3.23 (VC15 X86 64bit thread safe) + PEAR + phpMyAdmin 5.0.3 + OpenSSL 1.1.0g + ADOdb 518a + Mercury Mail Transport System v4.63 (not included in the portable version) + FileZilla FTP Server 0.9.41 (not included in the portable version) + Webalizer 2.23-04 (not included in the portable version) + Strawberry Perl 5.32.0.1 Portable + Tomcat 7.0.106 + XAMPP Control Panel Version 3.2.4. + XAMPP mailToDisk 1.0 (write emails via PHP on local disk in \mailoutput. Activated in the php.ini as mail default.) .