Site icon Pentarock Technologies

How To Install PHP 8 on Windows 10

How To Install PHP 8 on Windows 10

In this tutorial we will see how to install PHP 8 on Windows 10. However, PHP is and acronym for Hypertext Preprocessor. Moreover, it is the most popular, open source and cross platform server side scripting language. Additionally, PHP is supported on all the major operating systems like Windows, Linux and MacOS. Moreover, it is mostly used in web development because it can be embedded into HTML code. Also, the PHP code is enclosed between <?php and ?> Tags. However, PHP is easy, therefore it can be learnt quickly in no time. In addition to above it also supports all the major Web Servers. For example some of the most popular Web Server that support PHP are, Apache web Server, IIS Web Server, Nginx Web Server to name a few.

Although PHP is mostly used in combination with Mariadb Database Servers or MySQL Database Servers. But one of the most powerful features of PHP is that it supports almost all the major database servers.  For example some of the most popular database servers are SYBASE, IBM-DB2, Oracle, MSSQL, PostgreSQL, to name a few. Therefore creating a dynamic webpages is very easy by using any of the supported database connection.

Prerequisite For Installation of PHP 8 on Windows 10 OS

Following are the requirement for the installation of PHP 8 on Windows 10 Operating System.

Now, we will see how to install PHP 8 on Windows 10 step by step with no steps skipped.

Installation Steps

Download PHP

Next, to install PHP 8 on Windows 10 visit the official website of PHP and download 64 bit Non-Thread-Safe version of the Installer zip file on your system. A link to the zip file is given below. Also the download page will look like the below screen.


How To Install PHP 8 on Windows 10

Link to Official Website of PHP 8 for Installer File Download

However, we will also need Visual C++ redistributable 2015 and 2019 to be installed on our Windows 10 system, before the installation of PHP 8. For this download the Visual C++ redistributable for Visual Studio 2015 or 2016 and 2019, on your computer. A link to the download location on Official Microsoft Windows website  is given in the left sidebar of the official PHP download page. The same download links are also provided below.

Visual C++ Redistributable for Visual Studio 2015
Microsoft Visual C++ Redistributable for Visual Studio 2019

PHP 8 Installation Steps on Windows 10

How To Install PHP 8 on Windows 10

Configure PHP

However, now you have to configure the PHP so that it can work correctly on your system. There will be two files in the C:\PHP8 folders php.ini-development and php.ini-production. Next, rename the file php.ini-development to php.ini and open in a text editor. Also, change the following settings in the php.ini file.

extension=bz2
extension=curl
extension=ffi
extension=fileinfo
extension=gd2
extension=gettext
extension=gmp
extension=intl
extension=mbstring
extension=exif
extension=mysqli
extension=odbc
extension=openssl
extension=pdo_mysql
extension=pdo_odbc
extension=pdo_sqlite

Check Installation

Now to check PHP installation open the command prompt and type.

php –v

You will see the output as given below.

How To Install PHP 8 on Windows 10

Now the PHP is installed on your system correctly.

Configure Internet Information Services (IIS)

If you want to run your PHP websites on Internet Information Services (IIS) Webserver then you have to configure FastCGI Module in IIS webserver. To do this perform the following steps.

How To Install PHP 8 on Windows 10

Create a file phpinfo.php in any text editor. Type the following lines in it and save and exit.

<?php
phpinfo();
?>

Copy this file in the C:\Inetpub\wwwroot folder.

Open your browser and type :

http://localhost/phpinfo.php

You will see the output as given below.

How To Install PHP 8 on Windows 10

Now we have installed and tested PHP 8 successfully on our Windows 10 system. Enjoy!

Exit mobile version