Instructions on how to check the PHP version
- Instructions for how to use Gmail offline do not need a network
- Instructions on how to compile and execute Java using Command Prompt
- Instructions on how to create 3D effects and objects in Photoshop
If you are interested in adding new features on your site or trying to identify a programming error, you may have to check the PHP version that the server is currently using. You can check the version by running a simple PHP file on the server. Or you can check the PHP version being installed on the local computer using the Command Prompt command line interpreter application or Terminal emulator. Join TipsMake.com to consult the article on how to check the PHP version below!
Method 1: Server
1. Open the text editor or code.
You can use Notepad or TextEdit but don't use text editing software like Microsoft Word.
2. Enter the following code.
When running on your server, this code will return the PHP version information.
3. Save as PHP file.
Click " File " → " Save as " and give the file a name. Add the .php extension to the end of the name. Choose a simple name, such as version.php.
4. Create a more detailed report (optional).
The above file will tell you what the current version of PHP is. However, if you want more information, such as system information, release date, available commands, API information or more, you can use the phpinfo () command. Please save the file as info.php.
5. Upload your file (s) to the server.
You may have to use the FTP client program or download it via the server's administrative control panel. Leave the file in the root directory on your server.
6. Open the file on your browser.
Once the file has been uploaded to the server, you can use the browser to download them. Find the file location on the server. For example, if you leave them in the root directory of the domain, go to www.yourdomain.com/version.php .
- To see all the data, visit www.yourdomain.com/info.php .
Method 2: Local PHP version
1. Open Command Prompt or Terminal.
If PHP is installed locally, you can use Command Prompt or Terminal to check the version. Besides, you can also do this if you use SSH to create a remote connection to the server via the command line.
- Windows - Press
⌘ Win
+R
and typecmd
. - Mac - Open the Terminal from the Utilities folder.
- Linux - Open Terminal from the screen or by pressing
Ctrl
+Alt
+T
2. Enter the command to check the version of PHP.
When running the command, the installed PHP version will be displayed.
- Windows, Mac, Linux -
php -v
3. Fix the version number error that does not appear on Windows.
A common problem with Windows users is that PHP is not in the system path, so the message 'php.exe' is not recognized as an internal or external command, operable program or batch file
(cannot Specifies 'php.exe' as internal or external commands, executable programs or batch processing files).
- Find your php.exe file location. That's usually C: phpphp.exe, but you may have changed it during the installation.
- Type
set PATH=%PATH%;C:phpphp.exe
and pressEnter
. Change the actual position if it is not currently in this position. - Rerun
php -v
. Now you will be able to see the version number.
Refer to some more articles:
- Guide the most simple and effective way to write easy-to-read code
- Instructions for uninstalling software on Ubuntu
- Instructions on how to install Ubuntu on VirtualBox virtual machine
Having fun!
You should read it
- How to check the version of Excel in use
- Check version information in SQL Server
- How to view the version of Word in use
- How to check the version of macOS in use
- How to check the current Driver version of the computer
- How to Check PHP Version on Server
- How to Check PHP Version
- How to check TPM version before upgrading to Windows 11
- How to accurately check the lock or international version for iPhone
- How to check your Linux version
- How to check the version of Chrome browser, Coc Coc, Firefox is using is how many versions
- How to check the version of Microsoft Office you are using is 32-bit or 64-bit