Video: How to Check PHP Version: 3 Steps (with Images)
2024 Author: Barbara Vance | [email protected]. Last modified: 2023-12-16 17:45
Finding out which version of PHP is running on the server is important, for example, for those who are planning to upgrade the site or are trying to resolve a bug in the system. Fortunately, all you'll need to do this is deploy and access a PHP file on your server. Incidentally, it is also possible to do the same directly from the server, using the "Terminal" of Linux or Mac OS and the "Command Prompt" of Windows.
Steps
Method 1 of 2: Performing the web verification
Step 1. Open a text or code editor
Use "Notepad", "Sublime", "Word"" or any other program of your choice.
Step 2. Enter the code
Once run on the server, the code will return the version of PHP that is installed.
Current PHP version: 8.3.3-1+0~20240216.17+debian11~1.gbp87e37b
Step 3. Save the file as PHP
Click on the menu “File” → “Save As” and name the file. Insert the.php extension after the name. Prefer a simple, descriptive name like: version.php.
Step 4. Create a more detailed report (optional)
Use the phpinfo() command if you are interested in some details that go beyond the PHP version, such as: system information, build dates, available commands, API data and more. Save this file as info.php.
This program makes use of the Zend Scripting Language Engine: Zend Engine v4.3.3, Copyright (c) Zend Technologies
with Zend OPcache v8.3.3-1+0~20240216.17+debian11~1.gbp87e37b, Copyright (c), by Zend Technologies
mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.
Phar based on pear/PHP_Archive, original concept by Davey Shafik. Phar fully realized by Gregory Beaver and Marcus Boerger. Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Edin Kadribasic, Marcus Boerger, Johannes Schlueter, Moriyoshi Koizumi, Xinchen Hui
Embed
Edin Kadribasic
FastCGI Process Manager
Andrei Nigmatulin, dreamcat4, Antony Dovgal, Jerome Loyet
litespeed
George Wang
phpdbg
Felipe Pena, Joe Watkins, Bob Weinand
Module Authors
Module
Authors
BC Math
Andi Gutmans
Bzip2
Sterling Hughes
Calendar
Shane Caraveo, Colin Viebrock, Hartmut Holzgraefe, Wez Furlong
COM and .Net
Wez Furlong
ctype
Hartmut Holzgraefe
cURL
Sterling Hughes
Date/Time Support
Derick Rethans
DB-LIB (MS SQL, Sybase)
Wez Furlong, Frank M. Kromann, Adam Baratz
DBA
Sascha Schumann, Marcus Boerger
DOM
Christian Stocker, Rob Richards, Marcus Boerger
enchant
Pierre-Alain Joye, Ilia Alshanetsky
EXIF
Rasmus Lerdorf, Marcus Boerger
FFI
Dmitry Stogov
fileinfo
Ilia Alshanetsky, Pierre Alain Joye, Scott MacVicar, Derick Rethans, Anatol Belski
Firebird driver for PDO
Ard Biesheuvel
FTP
Stefan Esser, Andrew Skalski
GD imaging
Rasmus Lerdorf, Stig Bakken, Jim Winstead, Jouni Ahto, Ilia Alshanetsky, Pierre-Alain Joye, Marcus Boerger, Mark Randall
GetText
Alex Plotnick
GNU GMP support
Stanislav Malyshev
Iconv
Rui Hirokawa, Stig Bakken, Moriyoshi Koizumi
IMAP
Rex Logan, Mark Musone, Brian Wang, Kaj-Michael Lang, Antoni Pamies Olive, Rasmus Lerdorf, Andrew Skalski, Chuck Hagenbuch, Daniel R Kalowsky
Input Filter
Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye, Ilia Alshanetsky
Internationalization
Ed Batutis, Vladimir Iordanov, Dmitry Lakhtyuk, Stanislav Malyshev, Vadim Savchuk, Kirti Velankar
JSON
Jakub Zelenka, Omar Kilani, Scott MacVicar
LDAP
Amitay Isaacs, Eric Warnke, Rasmus Lerdorf, Gerrit Thomson, Stig Venaas
LIBXML
Christian Stocker, Rob Richards, Marcus Boerger, Wez Furlong, Shane Caraveo
Multibyte String Functions
Tsukada Takuya, Rui Hirokawa
MySQL driver for PDO
George Schlossnagle, Wez Furlong, Ilia Alshanetsky, Johannes Schlueter
MySQLi
Zak Greant, Georg Richter, Andrey Hristov, Ulf Wendel
MySQLnd
Andrey Hristov, Ulf Wendel, Georg Richter, Johannes Schlüter
OCI8
Stig Bakken, Thies C. Arntzen, Andy Sautins, David Benson, Maxim Maletsky, Harald Radi, Antony Dovgal, Andi Gutmans, Wez Furlong, Christopher Jones, Oracle Corporation
ODBC driver for PDO
Wez Furlong
ODBC
Stig Bakken, Andreas Karajannis, Frank M. Kromann, Daniel R. Kalowsky
Opcache
Andi Gutmans, Zeev Suraski, Stanislav Malyshev, Dmitry Stogov, Xinchen Hui
OpenSSL
Stig Venaas, Wez Furlong, Sascha Kettler, Scott MacVicar, Eliot Lear
Oracle (OCI) driver for PDO
Wez Furlong
pcntl
Jason Greene, Arnaud Le Blanc
Perl Compatible Regexps
Andrei Zmievski
PHP Archive
Gregory Beaver, Marcus Boerger
PHP Data Objects
Wez Furlong, Marcus Boerger, Sterling Hughes, George Schlossnagle, Ilia Alshanetsky
PHP hash
Sara Golemon, Rasmus Lerdorf, Stefan Esser, Michael Wallner, Scott MacVicar
Posix
Kristian Koehntopp
PostgreSQL driver for PDO
Edin Kadribasic, Ilia Alshanetsky
PostgreSQL
Jouni Ahto, Zeev Suraski, Yasuo Ohgaki, Chris Kings-Lynne
Pspell
Vlad Krupin
random
Go Kudo, Tim Düsterhus, Guilliam Xavier, Christoph M. Becker, Jakub Zelenka, Bob Weinand, Máté Kocsis, and Original RNG implementators
Readline
Thies C. Arntzen
Reflection
Marcus Boerger, Timm Friebe, George Schlossnagle, Andrei Zmievski, Johannes Schlueter
Sessions
Sascha Schumann, Andrei Zmievski
Shared Memory Operations
Slava Poliakov, Ilia Alshanetsky
SimpleXML
Sterling Hughes, Marcus Boerger, Rob Richards
SNMP
Rasmus Lerdorf, Harrie Hazewinkel, Mike Jackson, Steven Lawrance, Johann Hanne, Boris Lytochkin
SOAP
Brad Lafountain, Shane Caraveo, Dmitry Stogov
Sockets
Chris Vandomelen, Sterling Hughes, Daniel Beulshausen, Jason Greene
Sodium
Frank Denis
SPL
Marcus Boerger, Etienne Kneuss
SQLite 3.x driver for PDO
Wez Furlong
SQLite3
Scott MacVicar, Ilia Alshanetsky, Brad Dewar
System V Message based IPC
Wez Furlong
System V Semaphores
Tom May
System V Shared Memory
Christian Cartus
tidy
John Coggeshall, Ilia Alshanetsky
tokenizer
Andrei Zmievski, Johannes Schlueter
XML
Stig Bakken, Thies C. Arntzen, Sterling Hughes
XMLReader
Rob Richards
XMLWriter
Rob Richards, Pierre-Alain Joye
XSL
Christian Stocker, Rob Richards
Zip
Pierre-Alain Joye, Remi Collet
Zlib
Rasmus Lerdorf, Stefan Roehrich, Zeev Suraski, Jade Nicoletti, Michael Wallner
PHP Documentation
Authors
Mehdi Achour, Friedhelm Betz, Antony Dovgal, Nuno Lopes, Hannes Magnusson, Philip Olson, Georg Richter, Damien Seguy, Jakub Vrana, Adam Harvey
Editor
Peter Cowburn
User Note Maintainers
Daniel P. Brown, Thiago Henrique Pojda
Other Contributors
Previously active authors, editors and other contributors are listed in the manual.
PHP Quality Assurance Team
Ilia Alshanetsky, Joerg Behrens, Antony Dovgal, Stefan Esser, Moriyoshi Koizumi, Magnus Maatta, Sebastian Nohn, Derick Rethans, Melvyn Sopacua, Pierre-Alain Joye, Dmitry Stogov, Felipe Pena, David Soria Parra, Stanislav Malyshev, Julien Pauli, Stephen Zarkos, Anatol Belski, Remi Collet, Ferenc Kovacs
Websites and Infrastructure team
PHP Websites Team
Rasmus Lerdorf, Hannes Magnusson, Philip Olson, Lukas Kahwe Smith, Pierre-Alain Joye, Kalle Sommer Nielsen, Peter Cowburn, Adam Harvey, Ferenc Kovacs, Levi Morrison
This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact [email protected].
Step 5. Upload the files to the server
Use your favorite FTP client or server control panel. Save files to the root directory.
If you don't already know, learn how to upload files to the server
Step 6. Open the file in your browser
Once the file is saved on the server, you can access it through any web browser. Just type the full address in the address bar, for example: www.meusite.com.br/versao.php.
To access the more detailed file: www.meusite.com.br/info.php
Method 2 of 2: Performing a Local Verification
Step 1. Open "Command Prompt" or "Terminal"
Even if you don't have direct access to the server, you can resort to a remote connection using SSH.
On Windows, press ⊞ Win+R and type cmd.
On Mac OS, open "Terminal" in the "Utilities" folder.
On Linux, open "Terminal" from Dash or by pressing Ctrl+Alt+T simultaneously.
Step 2. Enter the command to check the PHP version
Similar to what happened in the “versao.php” file, this command will inform only the version of PHP that is installed on the server (no additional details).
The same command will work on Windows, Mac and Linux: php -v
Step 3. Understand a recurring Windows error
It is very common that, on Windows, PHP is not located in the system directory, which results in the message: 'php.exe' is not recognized as an internal or external command, operable program or batch file (php.exe does not is recognized as an internal or external command, an executable program, or a batch file).
Find the location of the php.exe file. Normally it is installed in C:\php\php.exe, however this path can be customized during the installation process, causing PHP to end up in another directory.
Type set PATH=%PATH%;C:\php\php.exe at the Command Prompt and hit ↵ Enter – remember to adjust the path if necessary.
Run the php -v command again. The PHP version should now appear.
This article will teach you how to use the "Wayback Machine" tool from the "Internet Archive" website to access archived versions of web pages. Steps Step 1. Access https://web.archive.org in a web browser Step 2.
A computer's BIOS is the firmware that connects the hardware and operating system. Just like any other software, it can be updated and knowing the version installed on your system is essential to check if you have the latest version or not. On Windows computers, you can find out the installed version via the Command Prompt by accessing the BIOS menu, and on computers with Windows 8 preinstalled via the UEFI interface, which allows you to access the BIOS without restarting the c
If you're solving a problem with your computer, you may need to know the current version and build of Windows. This information can help you narrow down issues based on the version used. Finding this data as well as the architecture (32-bit or 64-bit) of Windows takes just a minute.
This article will teach you how to open and edit a PHP programming file on a Windows or Mac computer. Steps Method 1 of 2: On Windows Step 1. Download and install Notepad++ This is a free text editor for Windows that can open PHP files.
This article will teach you how to find the version of Python installed on a Windows or Mac computer. Steps Method 1 of 2: On Windows Step 1. Open the Windows search screen If you don't have a search bar in your taskbar, click the magnifying glass icon or circle next to or press the ⊞ Win+S keys.