Lets start with PHP. Go to
https://windows.php.net/download/
Decide which PHP version you need.
At the time of this post, PHP 7.2 is latest version is available in following 4 version
VC15 x64 Non Thread Safe
VC15 x64 Thread Safe
VC15 x86 Non Thread Safe
VC15 x86 Thread Safe
x64 vs x86
x64 is for 64 bit OS. Most computers these days are 64 bit.
Thread Safe vs Non Thread Safe
Download “Thread Safe” version if you are using PHP as Apache Module or IIS.
Non-Thread Safe version is for running PHP as FCGI process.
Exact and put the content of ZIP file in folder
c:\PHP7
Download and Install Apache
Download latest Apache version from
https://www.apachelounge.com/download/
Download 32 or 64 bit depending on your Windows install.
Since we are installing PHP compiled with VC15, we need Apache compiled with VC15. So i downloaded following
https://www.apachelounge.com/download/VC15/binaries/httpd-2.4.33-Win64-VC15.zip
The site have other version available for VC14 and VC11, this is useful if you are installing older version of PHP that is compiled with older Visual Studio C++.
Edit httpd.conf, add following to end of the file
LoadModule php7_module "c:/php7/php7apache2_4.dll" AddHandler application/x-httpd-php .php PHPIniDir "c:/php7/"
If you want to install Apache as Service, run
httpd -k install -n "Apache 2.4"
-n “Apache 2.4” is the service name that will be visible in windows service manager.
Leave a Reply