Setting up Apache 2.4 with PHP 7.4
==================================

In this folder, just extract both apache (httpd-2.4.29-Win64-VC15) and php (php-7.4.4-Win32-VC15-x64)

would look like:

C:\Apache24
C:\php

then in apache, go to httpd.conf and edit it.
Add the following lines:


#
# php 7.4
#
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php .html
LoadModule php7_module "c:/php/php7apache2_4.dll"
PHPIniDir "c:/php" 


then save it. go to Apache24\bin using CLI or powershell then run:

httpd.exe -k install -n "Apache2.4"

this will install as a service. then to start and stop

httpd -k start
httpd -k stop

or

net start "Apache2.4"
net stop "Apache2.4"


then for PHP, copy the php.ini-development as php.ini then adjust the necessary configuration 
needed by your application. then since you're in dev mode, add this at the end of the php.ini:

[Xdebug]
zend_extension="C:/php/ext/php_xdebug-3.0.4-7.4-vc15-x86_64.dll"
xdebug.remote_port="9003"
xdebug.mode=debug


you can find the file in this folder and make sure you copy that xdebug dll file to C:\php\ext\

then restart the apache...

and if you have changes in your php.ini on next edit, restart again your apache.



-- camilo3rd | 2021-06-24





