We are going to use the unofficial Windows binary from Apache Lounge. This version has performance and stability improvements over the official Apache distribution, although I am yet to notice a significant difference. However, it is provided as a manually installable ZIP file from Download Apache2.4
Download PHP7.1
Extract the PHP binary archive using your unzip utility; C:\php7 is a common location.
Copy php.ini-development
or php.ini-production
to php.ini
If Some Error with
- api-ms-win-crt-runtime-l1-1-0.dll missing
- vcruntime140.dll missing To fix this error you need Visual C++ Redistributable for Visual Studio 2015. Download Visual C++ Redistributable
We will install Apache in C:Apache2, so extract the ZIP file to the root of the C: drive. Extract PHP7.1 to root C: drive
rem # Or whatever path you unzipped the Apache files
cd "C:\Apache24\bin"
You can install Apache as a Windows NT service as follows from the command prompt at the Apache bin subdirectory:
rem #Command to install Apache 2.4 as a Windows Service
httpd.exe -k install
If you use the first command without any special parameters except -k install, the service will be called Apache2.4 and the configuration will be assumed to be conf\httpd.conf.
If you need to specify the name of the service you want to install, use the following command. You have to do this if you have several different service installations of Apache on your computer. If you specify a name during the install, you have to also specify it during any other -k operation.
httpd.exe -k install -n "Apache 2.4"
If you need to have specifically named configuration files for different services, you must use this:
httpd.exe -k install -n "Apache 2.4" -f "c:\files\my.conf"
Removing an Apache service is easy. Just use:
httpd.exe -k uninstall
The specific Apache service to be uninstalled can be specified by using:
httpd.exe -k uninstall -n "Apache 2.4"
Add this line in Apache24\config\httpd.conf at TOP
LoadModule php7_module C:/php7/php7apache2_4.dll
<IfModule php7_module>
DirectoryIndex index.html index.php
AddHandler application/x-httpd-php .php
PHPIniDir "c:/php7"
</IfModule>
rem #Command to start the Apache Windows service
net start "Apache 2.4"
Modify Apache24\htdocs\index.php
<?php
echo phpinfo();
?>
Go to your browser and hit http://localhost
or http://127.0.0.1
Modify All c:\Apache24
to Drive:\Any\
in httpd.conf
which includes change your ServerRoot, DocumentRoot, cgi-bin, htdocs
Also PHP7 Location
Reference Apache2.4 Configuration
Install Maria DB