Monday, May 28, 2012

Apache, PHP, MySql for development purposes in Windows


Important: The Following is for development machine only.

Apache - httpd-2.2.22-win32-x86-no_ssl.msi Link: http://httpd.apache.org/download.cgi
PHP - php-5.2.17-Win32-VC6-x86.zip Link: http://windows.php.net/download/
MySql - mysql-installer-5.5.24.0.msi Link: http://www.mysql.com/downloads/installer/

Slected: Apache module + PHP V6-Thread Safe

(I) Configuring Apache

1. Install Apache

2. add the following in [Apache]\conf\httpd.conf
LoadModule php5_module "C:/php/php5apache2_2.dll"
<IfModule dir_module>
    DirectoryIndex index.php
</IfModule>
<IfModule mime_module>
AddType application/x-httpd-php .php
</IfModule>
3. Restart Apache

Your webroot will be at [Apache]\htdocs. You can change this path by editing the lines mentioned below in [Apache]\conf\httpd.conf
Eg:
DocumentRoot "C:/.../Apache Software Foundation/Apache2.2/htdocs" to
DocumentRoot "D:/ htdocs"
and
<Directory "C:/.../Apache Software Foundation/Apache2./htdocs"> to
<Directory "D:/htdocs">

(II) Configuring PHP

1. Extacted PHP zip to 'C:\php'

2. copy and rename [php]\php.ini-dist to [php]\php.ini

3. add the following in php.ini
extension=php_mysql.dll
extension_dir = "c:\php\ext"
4. copy [php]\libmysql.dll and [php]\php.ini to [Apache]\bin

5. Restart Apache

(III) Configuring MySql

Install as per your requirement.

No comments:

Post a Comment