Saturday, June 14, 2014

install php for apache win7 64x

Be sure that you have installed Visual C++ Redistributable for Visual Studio 2012 : VC11 vcredist_x64/86.exe

install/unzip apache.

make sure apache is not using the same port as IIS, port 80.

install apache as windows service with "httpd -k install" at command prompt(wuth administrator right).

edit httpd.conf.

pre php configuration
-------------------------
1. set ServerRoot "d:/www/Apache" where apache folder located.

2. change the port number if desire port is not 80, Listen 80

3. change document root if you have alternative location for web document
DocumentRoot "D:/www/htdocs"

D:/www/htdocs">

4. configure ServerName with parameter (make sure port 80 not conflict with IIS if IIS is installed).

ServerName localhost


php configuration
--------------------
1. add  at the last line of load module 
LoadModule php5_module "d:/www/php/php5apache2_4.dll"


2. add php extension to mime module

     AddType application/x-httpd-php .php


3. add PHPIniDir "d:/www/php" at the last of the line to tell where php located.


4. change default page as index.php at:
DirectoryIndex index.php index.html


5. restart apache