Wednesday, January 20, 2010

Installation PHP&MYSQL in IIS SERVER

TUTORIAL: PHP Application runs on IIS SERVER

There are 3 steps to Configure php,mysql,iis server in windows xp.

Step 1:
Enable IIS Server:
a)If you don't install iis server in windows xp then goto start->settings->controlpanel->Add or Remove Programs->Add/Remove Windows Component and
enable Internet Information Services(IIS) checkbox and proceed installation(need I386 folder in windows xp to complete installation).
b)After successful installation,open IE browser and click http://localhost it will display startup page of iis server.
This is completes IIS server Configuration in Windows.

Step 2:
Configuration PHP in IIS Server:
a)Download latest php zip from this url and extract the zip and place in temporary like (C:\php).
b)Copy php-ini-recommended file and rename to php.ini place it in c:\WINDOWS folder,if php.ini is presented means please take backup and overwrite the file.
c)Make the change extension_dir = "C:\php\ext" in php.ini file.
d)Configure IIS DLL for executing php on iis server.
Do Following thing:--
Start>control panel>administrative tools>Internet Information Service Expand the + buttons on the left side area if any and Right click the label saying default web site. You will get a list of items in the menu and then go to properties section.





Now you can execute PHP code using IIS webserver
Create a file info.php in C:\Inetpub\wwwroot with following code
phpinfo();
?>
Now execute the info.php file in browser using http://localhost/info.php ,then you will observe php configuration in the browser.

Note: Currently You cannot execute Mysql commands in php application.


Step 3:
Install Mysql in php
a)Download MYSQL from this url and install by click on the .exe through wizards.
b)Copy libmysql.dll file and place it in c:\WINDOWS\SYSTEM32 folder.
C)Edit php.ini from c:\WINDOWS folder to enable mysql library to php
Remove ; (mark) for this two dll's
extension=php_mysql.dll
extension=php_mysqli.dll


Now you can execute php+mysql application.

Good Luck

No comments:

Post a Comment