go to download page
https://windows.php.net/download/
There are a few version to choose.
TS refers to multithread capable builds.
Thread-Safe(TS) - use for single process web servers, like Apache with mod_php.
Use case for TS binaries involves interaction with a multithreaded SAPI and PHP loaded as a module into a web server.
With Apache you have to use the Thread Safe (TS) versions of PHP.
NTS refers to single thread only builds.
Non-Thread-Safe(NTS) - use for IIS and other FastCGI web servers (Apache with mod_fastcgi) and recommended for command-line scripts
Because we use Apache. so download the TS version.
VC14 x64 Thread Safe Zip [23.28MB] php-7.1.32-Win32-VC14-x64.zip
D:\php-7.1.32-Win32-VC14-x64\dev D:\php-7.1.32-Win32-VC14-x64\ext ... D:\php-7.1.32-Win32-VC14-x64\php.exe ...
php.ini-development
to a new file php.ini
D:\php-7.1.32-Win32-VC14-x64\php.ini D:\php-7.1.32-Win32-VC14-x64\php.ini-development D:\php-7.1.32-Win32-VC14-x64\php.ini-production
D:\Apache24\conf\httpd.conf
#LoadModule xml2enc_module modules/mod_xml2enc.so LoadModule php7_module "D:/php-7.1.32-Win32-VC14-x64/php7apache2_4.dll" PHPIniDir "D:/php-7.1.32-Win32-VC14-x64/php.ini"
add php type:
<IfModule dir_module> DirectoryIndex index.html index.php </IfModule> AddType application/x-httpd-php .php # # The following lines prevent .
Open a command prompt window, (if you use win10,open it using keyboard WIN+X,Press Windows+X to open the Power Users menu,then choose Command Prompt(Admin)
type:
C:\WINDOWS\system32>cd /d D:\Apache24\bin D:\Apache24\bin>httpd -k start
OR
C:\WINDOWS\system32>net start apache2.4
D:\Apache24\htdocs\index.php
<html> <head><title>hello - lautturi.com</title> <body> <?php echo "Hello PHP!"; ?> </body> </html>
visit it:
http://localhost/index.php
Create a new file
D:\Apache24\htdocs\phpinfo.php
<?php phpinfo(); ?>
http://localhost/phpinfo.php
https://windows.php.net/downloads/releases/archives/