Step to Configure Php and Apache at windows
Configure PHP and Apache windows 10
This configuration guide is using Php 5.6 and Apache 2.4 for 32 bit on windows 10x64.I do this installation because of Laravel PHP framework but this guide won't touch about the Laravel.
There some binaries that you might need to take care but I not gonna touch that at here either. If any question you can leave your comment below.
1) DOWNLOAD AND INSTALL APACHE
First, you will need to download apache, and I gonna use Apache Haus as an example.However, you can use others options here.
after you finish download then extract it. After that go to httpd-2.4.25-x86-vc14\Apache24\conf
and open the httpd.conf . (Assume you an expert ... else go leave here and download XAMPP or Easyphp)
Then find "Server root"
Define SRVROOT "D:\Program\httpd-2.4.25-x86-vc14\Apache24"
ServerRoot "${SRVROOT}"
Replace the "D:\Program\httpd-2.4.25-x86-vc14\Apache24"
to your director of the apache, you have download and extract.
After that, Find "listen" and change the "listen 80" to "listen 8080" or any others port you want.
Then next step is the "serverName". Change the server name to the port you have edit on the listen.
then open cmd and navigate to the directory bin
httpd -k start
httpd -k install
You go to browser and type in http://localhost:8080 or use the port you using at the listen and servername.
Done for the apache part temporary.
2) Download and install PHP5
First of cause is download php5 .Choose the thread safe
Extract it.
Add it to the System environment.
Control panel -> System and security -> System
at the left-hand side click "Advance System Settings" then go to Advanced tab and click the environment Variables
Create a new variable call "PHP_HOME". ( Replace the variable value with your PHP directory)
Then Put the php_home to your path.
Now go to the PHP dir and locate "php5apache2_4.dll" .
Now go back to the Apache24 directory, go to conf folder and edit the httpd.conf
Add the following at the end of the httpd.conf file
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php .html
LoadModule php5_module "D:\Program\PHP\php5apache2_4.dll"
PHPIniDir "D:\Program\PHP"
Remember replace the "D:\Program\PHP\php5apache2_4.dll" with the path of the php5apache2_4.dll
then open the cmd and type httpd -k restart
If don't have any error then is completed. Feel free to leave a comment if got problems or any correction. Thank for reading ~~~
Comments
Post a Comment