Php installer windows installer

  • PHP For Windows

    This site is dedicated to supporting PHP on Microsoft Windows.
    It also supports ports of PHP extensions or features as well as
    providing special builds for the various Windows architectures.

    If you like to build your own PHP binaries, instructions can be found on the
    Wiki.

    Which version do I choose?

    IIS

    If you are using PHP as FastCGI with IIS you should use the Non-Thread Safe (NTS) versions of PHP.

    Apache

    Please use the Apache builds provided by Apache Lounge.
    They provide VC15 and VS16 builds of Apache for x86 and x64.
    We use their binaries to build the Apache SAPIs.

    With Apache, using the apache2handler SAPI, you have to use the Thread Safe (TS) versions of PHP.

    VS16 & VS17

    More recent versions of PHP are built with VS16 or VS17 (Visual Studio 2019 or 2022 compiler respectively) and
    include improvements in performance and stability.

    — The VS16 and VS17 builds require to have the Visual C++ Redistributable for Visual Studio 2015-2022 x64 or x86 installed

    TS and NTS

    TS refers to multithread capable builds. NTS refers to single thread only builds. Use case for TS binaries involves interaction with
    a multithreaded SAPI and PHP loaded as a module into a web server. For NTS binaries the widespread use case is interaction with a web server through
    the FastCGI protocol, utilizing no multithreading (but also for example CLI).

    What is PGO?

    Profile Guided Optimization is an optimization
    feature available in Microsoft’s Visual C++ compiler that allows you to optimize an output file based on profiling data collected during test runs of the application or module.

    Links:

    • PGO on MSDN
    • Visual C++ Team Blog — PGO with PHP
    • PHP PGO build for maximum performance (old)

    amd64 (x86_64) Builds

    PHP 7 provides full 64-bit support. The x64 builds of PHP 7 support native 64-bit integers, LFS, 64-bit memory_limit and much more.

    x64 builds are recommended (almost all Windows installations support x64).

    Long and multibyte path

    PHP 7.1+ supports long and UTF-8 paths. See the manual for details.

    Archives

    Past releases are available from our archives, older versions
    not found there can be found at the Museum.

  • PHP 8.4 (8.4.6)

    Download source code [29.28MB]

    Download tests package (phpt) [17.32MB]

    VS17 x64 Non Thread Safe (2025-Apr-09 09:50:32)

    • Zip
      [32.21MB]
      sha256: cecb18d942dade37946d764aa4d34eb1aaad865d22686aaa063196673999dfd2
    • Debug Pack
      [36.98MB]
      sha256: f171c6ee2324db104c0ef5f0e14fe5efbfad1c16eb98f7893ac433b70d2d68ef
    • Development package (SDK to develop PHP extensions)
      [1.35MB]
      sha256: 84ca6bc35ffbb0f73d4c39818cec58aa758dadda7c6670e5a37d62bd10c7f00e

    VS17 x64 Thread Safe (2025-Apr-09 09:50:34)

    • Zip
      [32.36MB]
      sha256: 839bd1a47a8c0044eec4bac6550a22a94ccb0247b749ae72986681405c845e2c
    • Debug Pack
      [37.21MB]
      sha256: f1b159c6b53361346c1a4199b776ecdb1500730c4b6035b3e2e47f6524e6cd7e
    • Development package (SDK to develop PHP extensions)
      [1.35MB]
      sha256: 996043450b50580492c6c8717d0bfb8c700ec2fa0a0c878df3d463faa100392a

    VS17 x86 Non Thread Safe (2025-Apr-09 09:49:44)

    • Zip
      [28.89MB]
      sha256: b2e4ccd91db3cb334e7213ce6d7c80aef15acc141474be0eb51398d46c1bc2eb
    • Debug Pack
      [37.23MB]
      sha256: f48a1cc1fb9914f5a2b5b0b61c09154b41c8c9441c116cb8ca9f04a3ab5d9e65
    • Development package (SDK to develop PHP extensions)
      [1.35MB]
      sha256: d6e92e96ecd45676deee0182adf849882671fed9f88600050c216e8cbcff05f8

    VS17 x86 Thread Safe (2025-Apr-09 09:49:52)

    • Zip
      [28.96MB]
      sha256: 1d7ecf3b63c84ae2717bc9f6449a6907b35697f5ec621225f88af88721eca321
    • Debug Pack
      [37.3MB]
      sha256: aaadc3ebf91c8015a369b2bed8ac66dac918033c60d14cde1899a2e2cc0d655e
    • Development package (SDK to develop PHP extensions)
      [1.35MB]
      sha256: b9b7ecf3071f5ced0cb5a492cdc08a9786cfd976f71016e2ccb843a25296d5a2

    PHP 8.3 (8.3.20)

    Download source code [27.4MB]

    Download tests package (phpt) [16.61MB]

    VS16 x64 Non Thread Safe (2025-Apr-08 22:21:54)

    • Zip
      [30.7MB]
      sha256: 6936a823dcd3e6d6ae0a10a21b2d4bb0d9fd69873d5aa036e7a30b24582f2a11
    • Debug Pack
      [30.18MB]
      sha256: 994827708a8b6639a10e109f4369068e3b71d54334e44c038dccb91eef32906d
    • Development package (SDK to develop PHP extensions)
      [1.26MB]
      sha256: db1ed03b76c5f7e7a2f08ca7904e3184a9f278813f510fa9869e68e2453c40e3

    VS16 x64 Thread Safe (2025-Apr-08 22:21:18)

    • Zip
      [30.84MB]
      sha256: 3a1cfcf5d23ad632e3ef3fa95e9fba1dee958c9879016934bba35e210a43091d
    • Debug Pack
      [30.37MB]
      sha256: 65e7cce5293f500b3636e450328a50f83843ea70fea318d890040e07d2db1b37
    • Development package (SDK to develop PHP extensions)
      [1.26MB]
      sha256: 09856678ddcafc7385c8f39ed026e7eefc0016f6922319b0085469fc510e2e6b

    VS16 x86 Non Thread Safe (2025-Apr-08 22:21:04)

    • Zip
      [27.56MB]
      sha256: 55eb03967d295e4792c5bacf433b78e6f5f2252d9c0c649dad2cd3da66aa4346
    • Debug Pack
      [30.19MB]
      sha256: 5415b5a2dee612ac6d8aee61eb72f8f31c3c19949d51cc64e137279c36c05a86
    • Development package (SDK to develop PHP extensions)
      [1.26MB]
      sha256: 588175fbcd3c2f5d76b4fe7394fd6db2e397773ef448fc99475c40e39b8d188b

    VS16 x86 Thread Safe (2025-Apr-08 22:19:12)

    • Zip
      [27.54MB]
      sha256: 033589745d7be54978e9f3db8e53424baed81b7624765504650b6ea8a1ab5f0f
    • Debug Pack
      [29.8MB]
      sha256: 3a85e6f97663286307759e643f84fa50e832d8503bf972c5219eeee5b6146b23
    • Development package (SDK to develop PHP extensions)
      [1.26MB]
      sha256: 547f7fb32590f6dd265eae8decb6c0b7e4a8e621a6354b8d2b61472f8d643a67

    PHP 8.2 (8.2.28)

    Download source code [26.52MB]

    Download tests package (phpt) [15.89MB]

    VS16 x64 Non Thread Safe (2025-Mar-11 18:55:38)

    • Zip
      [30.33MB]
      sha256: eb25bf88edc2b7648b0757f2885df4573a0c85b43bde69a9277b258760562b96
    • Debug Pack
      [25.43MB]
      sha256: 22850eef389a4540dcc92f377caf99b08d1b6e453731995c79d28aeed27bf92c
    • Development package (SDK to develop PHP extensions)
      [1.24MB]
      sha256: 662c730a96e80cfb3bd063db63785c11c9512d2e4b9d46292e9121b800e6b4e8

    VS16 x64 Thread Safe (2025-Mar-11 18:57:48)

    • Zip
      [30.44MB]
      sha256: 50cc8d5437ae81356de64cd6f79996c4f5a2b8a2e2479a0be9af13b16a7eecc8
    • Debug Pack
      [25.59MB]
      sha256: 53dd31a1fa11fb6c8ef28701f5273326300e1d1847ff8712a9daf723732e152b
    • Development package (SDK to develop PHP extensions)
      [1.24MB]
      sha256: c41fe84958fca14eb5f7434c7bfa1bfaedf0f74eadf9db4bcbdc3e1d48984340

    VS16 x86 Non Thread Safe (2025-Mar-11 18:52:24)

    • Zip
      [27.22MB]
      sha256: 65775058a844e60b9a7bdcae1827f053cf2e9bafef482ae637ff0749d10bd7b2
    • Debug Pack
      [25.62MB]
      sha256: d97029baed625b58b30e9ec433358bc4fdb83f9d3efcac5a90d9b9b730d719e9
    • Development package (SDK to develop PHP extensions)
      [1.24MB]
      sha256: 38fd9dba94e75705b7932536393b3f16cd8340171450ee1b252e2b03a6dcaafd

    VS16 x86 Thread Safe (2025-Mar-11 18:51:46)

    • Zip
      [27.2MB]
      sha256: bb5d555e2ecb9c1c220140f92cc53e7709feb2953434b888562d06165c8f14a9
    • Debug Pack
      [25.28MB]
      sha256: d09f710e2f485e0dc4713ae4331de2231d81a945373ccbad8dc239c435319bb2
    • Development package (SDK to develop PHP extensions)
      [1.24MB]
      sha256: 1075002f9bbe1190cab7955f97e1c01e42afd8315f2adcc8726f3699cd43327c

    PHP 8.1 (8.1.32)

    Download source code [25.74MB]

    Download tests package (phpt) [15.43MB]

    VS16 x64 Non Thread Safe (2025-Mar-12 11:13:34)

    • Zip
      [29.34MB]
      sha256: a39a588cbfd304bda51ea5c9b13fec53b9a63f0f306f53ee08409fda58dabbfb
    • Debug Pack
      [24.93MB]
      sha256: f5c327bf4ad24722f9b4dbdcd546c16edcf0562e63ba5446e9bcec74c0ddcf11
    • Development package (SDK to develop PHP extensions)
      [1.21MB]
      sha256: 7a9560331219f198d172cfe6883297ec13ed30b6b01318b5aa962b642464269a

    VS16 x64 Thread Safe (2025-Mar-12 11:17:00)

    • Zip
      [29.44MB]
      sha256: 6729ee58a364b5176360ce826678840a54c55e6036d11499330383cd6689f8e4
    • Debug Pack
      [24.81MB]
      sha256: 7e9511ff17ca112bdcec2594037ba26e3e4829a59e4160c7b8438052c2287fdf
    • Development package (SDK to develop PHP extensions)
      [1.21MB]
      sha256: 9f14572b3aeabcc2a591300a20209ce72b08ca9e5152b74a6840114eb7345d7f

    VS16 x86 Non Thread Safe (2025-Mar-12 11:12:10)

    • Zip
      [26.39MB]
      sha256: 1c2705f73b5eb79e5695622f73d254bcf486f782c9b8c9c2bfc0aabdb80e122e
    • Debug Pack
      [24.99MB]
      sha256: 3a4265a1adf0b592aaf09d3c489b81b214c2c7eedf9fc7677c1f739a5cac13d8
    • Development package (SDK to develop PHP extensions)
      [1.21MB]
      sha256: 889419a652b933b1804fa028ed31b945a7229b0a511e87a67a61023a3a88a210

    VS16 x86 Thread Safe (2025-Mar-12 11:10:46)

    • Zip
      [26.37MB]
      sha256: 1b1dd346ee0b329e7b92a984f2f3dc6c987a300289ff112f978dfcce30565893
    • Debug Pack
      [24.61MB]
      sha256: d9bfac775f4eff2c291e24f4928e91d0bf2482654431876c4232ef7a7fde520d
    • Development package (SDK to develop PHP extensions)
      [1.21MB]
      sha256: bef96cb478e8b34a3d20d6c01e676a68e182c0b4d4456e3a5b3bee440779e970

Obtaining PHP

  • Download latest version of PHP from http://www.php.net/downloads.php.
  • You can also download the .msi package i.e. windows installer of PHP from sourceforge.net

Prerequisite and running on your Windows system, else you will not be able to run PHP Scripts.

Alternatively, you can install WAMP server or AMPPS server to install PHP, MySQL, and Apache Web Server on your Windows machine.

Options for installing PHP on Windows

  • You can install php on windows manually.
  • You can run the .msi package, i.e. windows installer for php to install php.
  • Besides full installation, you can install php extensions on an existing installation of PHP.
  • You can upgrade to a higher version of PHP from an existing version.

Install PHP on Windows manually

You have to download zipped binary version of PHP from http://www.php.net/downloads.php.

Extract the downloaded file to php folder which must be created at the root of any of your windows drives (e.g. c:\php or d:\php).

Enter php folder and rename the file php.ini-recommonded to php.ini.

Open the file php.ini with any text editor and find extension_dir within the file.

Change the extension directory, i.e. if you have installed php in php folder of D drive, setting will be extension_dir=D:\php.

Now you open Environment Variables (MyComputer -> System Properties -> Environment Variables), under system variables, select Path and click Edit,
in the Variable value, go to the end of the list and put a semicolon, then  add  D:\php;D:\php\ext assuming D:\php is the location of your php installation.

Then Click on New under system variable and add PHPRC against Variable name and D:\php against Variable value.

Restart your system.

Install PHP on Windows using Windows installer 

Simply run the .msi Windows installer file and follow the installation wizard.

Testing if PHP is installed properly

Create a php file containing code <?php echo phpinfo(); ?> and save it as test.php.
Run this file on your web server and if you get an output like this:

install PHP on Windows

then you have installed PHP properly.

Install PHP extensions on Windows

What is a PHP extension?

A PHP extension is a piece of code which is not part of the core PHP and you need it to explore certain functionalities
of PHP (e.g. for using mysql you need mysql extension of PHP).

Many extensions are available out of the box in the PHP installer downloaded
from php.net or in the .msi package. But many need to be obtained separately from php.net.

In Windows, extensions come in the form of a  .dll file which you can download from php.net.

How do you configure an extension on Windows?

You need to change the setting of extension dir in php.ini file. For example, If you are using PHP 5.0.3, and you have installed php in c:\php, then you have to set extension_dir = C:\php\ext in your php.ini file.

After downloading the files needed, you have to open php.ini and enable a line pointing to an extension in question.

For enabling extensions, you have to uncomment a line in your php.ini file. For example, for enabling mysql extension, you have to change; extension = php_mysql.dll to extension = php_mysql.dll in your php.ini file.

You also need to restart your web server and php in order to complete the installation of a specific extension.

Sample php.ini

Previous: PHP Home
Next: Install php on Linux

If you’re looking to develop with PHP on a Windows system, knowing how to install PHP on Windows is essential for setting up your development environment. Installing PHP on Windows can seem a bit tricky at first, but with the right steps, it’s a straightforward process. In this guide, we’ll walk you through how to install PHP on Windows, including configuration and verification, so you can start coding in PHP smoothly and efficiently. Whether you’re a beginner or an experienced developer, these steps will help you get up and running with PHP in no time.

Prerequisites

  • A Windows machine with administrative access.
  • An internet connection to download PHP and related files.

1: Download PHP

  1. Visit the PHP Website
    Go to the official PHP download page to get the latest stable version of PHP for Windows.
  2. Choose the Thread-Safe Version
    Under the Windows downloads section, select the “Thread Safe” version, as it is recommended for web server usage. Download the ZIP file (e.g., php-8.x.x-Win32-vs16-x64.zip).

2: Extract the PHP Files

  1. Locate the Downloaded File
    Navigate to your downloads folder and locate the ZIP file you downloaded.
  2. Extract PHP to a Folder
    Right-click the ZIP file, select “Extract All,” and choose C:\php as the destination folder. This is the recommended location for easy configuration, but you can use a different path if needed.

3: Configure PHP Environment Variables

To use PHP from the command line, you’ll need to set it in your system’s PATH environment variable.

  1. Open Environment Variables
    • Go to Start, type “Environment Variables,” and select Edit the system environment variables.
    • In the System Properties window, click on Environment Variables.
  2. Add PHP to the Path
    • Under System Variables, find the Path variable and click Edit.
    • Click New and add the path to your PHP folder (e.g., C:\php).
    • Click OK to save and close all windows.

4: Configure php.ini

The php.ini file allows you to configure PHP’s behavior.

  1. Locate the php.ini File
    In the C:\php directory, you’ll see two files: php.ini-development and php.ini-production. Choose one based on your environment:
    • For development, rename php.ini-development to php.ini.
    • For a live server, rename php.ini-production to php.ini.
  2. Edit Key Settings
    Open the php.ini file in a text editor (like Notepad) and set the following parameters:
    • Enable Extensions: Uncomment lines for any extensions you need by removing the semicolon (;) in front of them, e.g., extension=mysqli.
    • Set Timezone: Search for date.timezone and set it to your timezone (e.g., date.timezone = "America/New_York").
  3. Save and Close
    Save the changes and close the file.

5: Verify PHP Installation

  1. Open Command Prompt
    Press Win + R, type cmd, and press Enter to open the command prompt.
  2. Check PHP Version
    Type php -v and press Enter. If PHP is installed correctly, it will display the version and other details.

6: Run a Test PHP Script

Now, let’s ensure PHP is working by creating a simple script.

  1. Create a PHP File
    Open a text editor and type the following PHP code:phpCopy code<?php echo "Hello, PHP is working!"; Save the file as test.php in your C:\php directory or any directory of your choice.
  2. Run the PHP Script from Command Line
    In the command prompt, navigate to the directory where you saved test.php and run:Copy codephp test.php You should see the output: Hello, PHP is working!.

7: Integrate PHP with a Web Server (Optional)

If you want to run PHP scripts via a web server, you can install a local server like Apache or Nginx.

Option A: Install XAMPP or WAMP (Recommended for Beginners)

  • XAMPP and WAMP are all-in-one packages that include Apache, PHP, and MySQL.
  • Download and install one of these packages, and it will automatically configure PHP with Apache.

Option B: Manual Apache Configuration (Advanced Users)

Restart Apache, and PHP should be configured to work with your server.

Download and install Apache.

Open Apache’s httpd.conf file and add the following lines to configure PHP:apacheCopy code# Add to the end of httpd.conf LoadModule php_module "C:/php/php8apache2_4.dll" AddHandler application/x-httpd-php .php PHPIniDir "C:/php"

Conclusion

And there you have it! You’re now ready to start learning PHP and build interactive web pages on your Windows machine. For more in-depth tutorials, don’t hesitate to visit Newtum. Dive deeper, experiment, and happy coding!

Edited and Compiled by

This blog was compiled and edited by Rasika Deshpande, who has over 4 years of experience in content creation. She’s passionate about helping beginners understand technical topics in a more interactive way.

About The Author

Last Updated :
09 Sep, 2024

PHP is a general-purpose scripting language geared towards web development. It is an open-source software (OSS), which is free to download and use. PHP stands for “Hypertext Preprocessor”. PHP files are saved with an extension called .php. It supports many databases MySQL, Oracle, etc.

Installation of PHP on Windows

Follow the below steps to install PHP on Windows:

Step 1: Visit https://www.php.net/downloads website using any web browser and click on Downloads.

Step 2: Click on the Windows “Downloads” button.

Step 3: The new webpage has different options, choose the Thread safe version, and click on the zip button and Download it.

Step 4: Now check for the zip file in downloads in your system and extract it.

Step 5: After extracting, you get the extracted folder.

Step 6: Now copy the extracted folder.

Step 7: Now paste the copy folder in your windows drive in the Program files folder.

Step 8: Now the Permission Windows appears to paste the folder in program files then click on “Continue”.

Step 9: Now after pasting the folder then copy the address of the folder in program files.

Step 10: Now click on Start Menu and search “Edit the system environment variables” and open it.

Step 11: After opening System, Variable New window appears, and click on “Environment Variables…”

Step 12: Now go to the “System variables” Path option and double click on Path.

Step 13: Next screen will open and click on the “New” button.

Step 14: After New  Paste the address we copy from program files to new and click on Enter button.

Step 15: Now Click on the OK button.

Step 16:  Click on the OK button. 

Step 17: Click on OK for saving changes.

Step 18: Now your PHP is installed on your computer. You may check by going to the “Start” menu typing Command Prompt. Open it.

Step 19: When the Command Prompt opens, type php -v

Step 20: Now enter the command prompt to show the version of PHP installed on your computer.

Finally, You have successfully installed PHP on your Windows 10 system.

In this article, we’re going to discuss how to install PHP on Windows. There are three different ways to install and run PHP on Windows, and we’ll look at each one.

PHP is a server-side scripting language which is mostly used to build web applications—these may range from a very simple blog website to a full-fledged eCommerce store. In fact, PHP is one of the most popular server-side scripting languages for web development.

In the next section, we’ll go through the prerequisites for installing PHP on your Windows computer.

Prerequisites

Before we install PHP, let’s make sure of the following things.

The first thing to check is the Windows version. If you’re using a Windows version older than Windows 2008/Vista, you won’t be able to install PHP versions that are greater than 5.5. As per the official documentation, as of the PHP 7.2.0 version, Windows 2008 and Windows Vista are not supported.

Thus, it’s important to be sure that your Windows version aligns with the PHP version you want to install.

In the next section, we’ll discuss different ways to install PHP. If you want to install PHP manually, you should be comfortable editing a few system files since that is part of the manual installation process. On the other hand, if you just use the all-in-one package, it will be pretty straightforward, and all the configuration will happen automatically.

Today, we’re going to install the latest stable version of PHP, which is 7.4. In fact, PHP has several different versions, and if you want to install a different version of PHP and are facing any difficulties, drop me a line in the comments section and I’ll be happy to help.

With that out of the way, let’s get started installing PHP!

Possible Ways to Install PHP on Windows

In this section, I’ll briefly discuss the different ways you can install PHP on Windows.

Manual Installation

In the manual installation process, apart from downloading the PHP package, you need to go through a couple of steps to properly configure it. As I said earlier, if you prefer manual installation, you should be comfortable enough to edit a few configuration files in the text editor.

All-in-One Packages

There are a couple of popular Windows PHP distributions that come as all-in-one packages. Apart from PHP, these also install and configure the Apache web server and a MySQL database server. These packages are really useful for developers who want to set up and run the full web development stack quickly and easily.

XAMPP and WampServer are two of the most popular Windows distributions among the PHP community.

Using a .msi Installer

I would say this was one of the easiest and most preferred ways to install PHP among newbies. But it’s deprecated and not recommended anymore. To install PHP with an installer, you just need to download the .msi installer and run it to install PHP just like any other software you install on Windows.

However, as of PHP 5.4.0, you won’t find the .msi installer files on the PHP downloads page. So this is only going to be useful if you want to install an older PHP version. As it’s deprecated, we won’t discuss this installation method in detail.

How to Install PHP on Windows Manually

In this section, we’ll go through the steps that are required in order to install PHP in your Windows installation manually.

Download and Extract the PHP Package Files

The first thing you have to do is to download the PHP package file of your choice from the official PHP downloads page.

You’ll find .zip files available for both x86 and x64 systems, so make sure to download the correct one as per your Windows OS architecture. Also, you’ll have to choose either to download the non-thread-safe or thread-safe version of PHP. If you’re planning to run PHP as an Apache module, the thread-safe version is recommended. However, if you want to run PHP as a CGI module, you can choose either of them!

Next, you need to extract the .zip file in the directory where you want to install PHP. A common install location is C:\php. Create the php directory and extract the .zip file contents inside the C:\php directory.

Configure the php.ini Configuration File

In this section, we’ll discuss the necessary changes you need to make in the php.ini configuration file.

The PHP package that you’ve just downloaded already contains two different versions of the configuration file: php.ini-development and php.ini-production. The php.ini-development file is designed and configured for your local development. This has a lot of features enabled which make it easier to test and debug your code, but it makes your software run slower and is not secure for a live site. On the other hand, the php.ini-production file is designed for optimum performance and security. We’re going to use the php.ini-production file.

As PHP detects the php.ini file as its configuration file, you’ll have to copy the file which you choose for your local development, and rename it to the php.ini file. As we’re going to use the production version, copy the php.ini-production file to the C:\php\php.ini file.

Next, open the php.ini file in your favorite text editor and find the following line.

It’s the path of the PHP extensions directory, and let’s change it as shown in the following snippet.

1
extension_dir = "C:/php/ext"

It’s important to note that we’ve also removed the semicolon in front of the line to make sure it’s not commented. Of course, you need to adjust the above path to match your installation directory.

And with that, we’ve finished the php.ini configuration file changes.

Configure the PATH Environment Variable

In this final section, we’ll see how to add the PHP installation path to the PATH environment variable. The process of updating the PATH variable in Windows changes from version to version. I’ll show you how to change it in Windows 10, but feel free to ask me if you’re using a different version.

In the Windows search bar, just type the environment keyword and choose Edit the system environment variables in the search results. Go to the Advanced > Environment Variables section. Edit the PATH environment variable and add ;C:\php to the end. This will make it so you can run PHP just by typing php from the command prompt, no matter what folder you’re in.

Finally, reboot the system, and you’re done. You’ve successfully installed PHP in your Windows installation!

Installing With an All-in-One Package

As I mentioned earlier, XAMPP and WampServer are popular all-in-one packages that allow you to install PHP along with the other essential web development components like a web server and database server.

Irrespective of the tool you choose, the process of installing these tools is pretty straightforward. You just need to download the corresponding installer and run it to install it in your Windows installation. We won’t go into the details of this, but if you have any queries regarding this, feel free to post them.

In the next section, we’ll see how to enable specific PHP extensions in your PHP installation.

How to Install PHP Extensions

In this section, we’ll see how to enable PHP extensions. 

Every time you want to enable a specific extension in PHP, you just need to find the associated entry in the php.ini configuration file and uncomment it.

For example, let’s say you want to enable the mysqli extension. Then you need to search for the extension=mysqli entry in the php.ini file and uncomment it, as shown in the following snippet.

1
2
3
;extension=mbstring
4
;extension=exif      ; Must be after mbstring as it depends on it
5
extension=mysqli
6
;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client
7
8

In the same way, you can enable other extensions as well.

Learn PHP With a Free Online Course

If you want to learn PHP, check out our free online course on PHP fundamentals!

In this course, you’ll learn the fundamentals of PHP programming. You’ll start with the basics, learning how PHP works and writing simple PHP loops and functions. Then you’ll build up to coding classes for simple object-oriented programming (OOP).

Along the way, you’ll learn all the most important skills for writing apps for the web: you’ll get a chance to practice responding to GET and POST requests, parsing JSON, authenticating users, and using a MySQL database.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как очистить системный диск удалив устаревшие обновления в windows 7
  • Как посмотреть очередь диска windows
  • Samba share for windows
  • Windows media player для чего
  • Отпечаток пальца windows 10 домен