Monday, July 25, 2011

Setup PHP - Mysql - Phpmyadmin on Windows server 2003: using FastCgi

Prepairing:
* FastCgi: (The difference between CGI, ISAPI, and FastCGI)
- I used ISAPI modules for the PHP implementation on my windows server 2003 therebefore, it's performance however I have ever seen some errors with this module on my php applications. Until, I moved to FastCgi. FastCGI offers a solution that delivers both performance and stability.
- On windows server 2003, fastcgi is not installed by default to IIS6 and 5.1, you will need to setup addition this protocol on your windows server.
- Download here: http://www.iis.net/download/fastcgi

* PHP:
- Download lastest PHP intaller on http://windows.php.net/download/ . I recommend to download for version 5.3.6 (.msi) or later (because this is fixed for sendmail use external SMTP, mean of you can send email work fine use other Smtp likes: smtp.gmail.com:465 , cause of openssl is enabled).
- Non thread safe & thread safe. PHP was released two version, and you can choose the version that depend your purposes. As you know, many popular extensions to PHP are not thread-safe, if the PHP implementation is thread-safe then the server can become unstable. Hence, many applications cannot run(ex: error of import database use phpmyadmin). Thus, I recommend to Non thread safe.
- In this post, I will use the PHP installer(.msi) for easy. No recommend for advanced users.

*MySql:
- Download Mysql msi installer for windows here: http://www.mysql.com/downloads/mysql/

*Phpmyadmin:
- Download here: http://www.phpmyadmin.net/home_page/downloads.php
- Classical UI: version 3.3.10.2 to order
- New UI: 3.4 to later.

Installation
Step by step....
Step 1: Install FastCgi
Step 2: Install PHP use Msi installer with FastCgi option.
Step 3: Install Mysql and remember your root password
Step 4: Copy phpmyadmin to your webroot(ex: C:\inetpub\wwwroot). Modify config.inc.php file with your mysql root user/password.
Step 5: Restart IIS to apply the changes to IIS

Done.

No comments:

Post a Comment