PHP Dev Env Setup on Windows Manually
Download Webserver
Section titled “Download Webserver”https://www.apachelounge.com/download/
### Install Webserver
httpd.exe -k install
Add Webserver to the Path
Section titled “Add Webserver to the Path”add to the path variable C:\Users\ahmad\web-server\Apache24\bin
Errors and Solutions
Section titled “Errors and Solutions”Error#1
Section titled “Error#1”httpd.exe: Syntax error on line 39 of C:/Users/ahmad/web-server/Apache24/conf/httpd.conf: ServerRoot must be a valid directory
1: Solution of Error#1
Section titled “1: Solution of Error#1”Define SRVROOT “c:/Users/ahmad/web-server/Apache24”
Error#2
Section titled “Error#2”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
Solution of Error#2
Section titled “Solution of Error#2”at line number 228 ServerName localhost
Download PHP
Section titled “Download PHP”Download the thread safe version https://windows.php.net/qa/
unzip php
Section titled “unzip php”Add php to Path Variable
Section titled “Add php to Path Variable”add to the path variable C:\Users\ahmad\php-windows\php847
Link Apache With php
Section titled “Link Apache With php”Keep Eye on Apache Logs
Section titled “Keep Eye on Apache Logs”C:\Users\ahmad\web-server\Apache24\logs
Edit httpd.conf
Section titled “Edit httpd.conf”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 .phpPHPIniDir "C:\Users\ahmad\php-windows\php847"References
Section titled “References”https://www.geeksforgeeks.org/how-to-install-php-on-apache-in-windows/
Configure PHP
Section titled “Configure PHP”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
Database
Section titled “Database”Download MariaDB
Section titled “Download MariaDB”Install MariaDB
Section titled “Install MariaDB”Keep Note of root user and password
Download phpMyAdmin
Section titled “Download phpMyAdmin”phpMyAdmin Configurations
Section titled “phpMyAdmin Configurations”Make a bakup of it config.sample.inc.php
then rename the file to config.inc.php
Unzip phpMyAdmin
Section titled “Unzip phpMyAdmin”unzip the phpMyAdmin at C:\Users\ahmad\web-server\Apache24\htdocs