Skip to content

PHP Dev Env Setup on Windows Manually

https://www.apachelounge.com/download/

download-the-apache-server ### Install Webserver

httpd.exe -k install

add to the path variable C:\Users\ahmad\web-server\Apache24\bin

httpd.exe: Syntax error on line 39 of C:/Users/ahmad/web-server/Apache24/conf/httpd.conf: ServerRoot must be a valid directory

Define SRVROOT “c:/Users/ahmad/web-server/Apache24”

AH00558: httpd.exe: Could not reliably determine the server’s fully qualified domain name, using fe80::609f:5770:43e5:5e2b. Set the ‘ServerName’ directive globally to suppress this message

at line number 228 ServerName localhost

Download the thread safe version https://windows.php.net/qa/

add to the path variable C:\Users\ahmad\php-windows\php847

C:\Users\ahmad\web-server\Apache24\logs

httpd.conf is located for me at C:\Users\ahmad\web-server\Apache24\conf

paste the following at the end of httpd.conf file.

LoadModule php_module "C:\Users\ahmad\php-windows\php847\php8apache2_4.dll"
AddHandler application/x-httpd-php .php
PHPIniDir "C:\Users\ahmad\php-windows\php847"

https://www.geeksforgeeks.org/how-to-install-php-on-apache-in-windows/

Enable the php extensions in Windows

Line number 764

extension_dir = “C:\Users\ahmad\php-windows\php847\ext”

Line number 916

enable extensions that you need by uncommenting

Keep Note of root user and password

https://www.phpmyadmin.net/

Make a bakup of it config.sample.inc.php

then rename the file to config.inc.php

unzip the phpMyAdmin at C:\Users\ahmad\web-server\Apache24\htdocs