Friday, January 8, 2010

Installing Drupal 5.1, PHP 5.2 and MySQL 5.0.2 on IIS environment

1.    Install IIS (I am using Windows XP)
•    Go to "Control Panel" and then "Add or Remove Programs"
•    Click the "Add/Remove Windows Components" button
•    Click "Internet Information Services"
•    Click the "Next" button to install (you might need your Windows CD)
2.    Once IIS is installed, download Drupal 5.1, PHP 5.2 and MySQL 5.0.2
3.    Go to "c:\Inetpub\wwwroot" and make a folder called "Drupal"
4.    Extract the contents of the Drupal-5.1.tar.gz to the folder you just created.
5.    In c:\Inetpub\wwwroot\Drupal", create another folder called "files".
6.    Now install PHP, create a folder in the "c:\" root called "PHP5". Extract the contents of "php-5.2.0-Win32.zip" to "c:\PHP5"
7.    Put PHP into to the path by:
•    Clicking "Start" and then right-click "My Computer" and select "Properties"
•    Select the "Advanced" tab
•    Click the "Environment Variables" button at the lower left.
•    When the "Environment Variables" window opens, go to the second text box and scroll down until you see "Path". Select "Path" and click the "Edit" button.
•    In the "Variable Value" text box, go to the end and type ";C:\PHP5"
***Note: do not forget the semicolon at the beginning
8.    Install MySQL. I will not go into detail for this just do a "Typical" install.
9.    Use the file "INSTALL.mysql.txt" located in the Drupal directory to configure MySQL.
10.    Open Windows Explorer and navigate to "c:\Inetpub\wwwroot\drupal\sites\default" and edit the "settings.php".
•    On line 93, change the mysql statement to your database settings you just created.
•    When you have saved the file, right-click the "settings.php", select "Properties" and change it to "Read-Only".
11.    In order to get PHP working with MySQL, do the following:
•    Copy from "c:\PHP5" – "libmysql.dll", "php5ts.dll" and "php.ini-recommended" to "c:\windows"
•    Go to "c:\windows" and rename "php.ini-recommended" to "php.ini"
•    Edit "php.ini" located in "c:\windows"
•    Go to line 520 and change it to read
extension_dir = "c:\php5\ext"
•    Change line 709 and 713 to fit your SMTP server and user (remove the semicolon in front to uncomment).
•    Uncomment lines 631, 639 and 651 (remove the semicolon in front to uncomment). The extensions should be for "php_mbstring.dll", "php_gd2.dll" and "php_mysql.dll".
•    Save and exit the file.
12.    In order to get PHP working with IIS, do the following:
13.    Go to "Start" and right-click "My Computer" and select "Manage".
14.    This will bring up the "Computer Management" window. Double-click "Services and Applications" and double-click "Internet Information Service".
15.    Right-click "Web Sites" and click "Properties"
16.    The "Web Sites Properties" windows will open. Select the "ISAPI Filters" tab and then click the "Add" button
•    "Filter Properties" window will open. Type "PHP" for the filter name and browse "C:\PHP5\" for the executable. Should read "C:\PHP5\php5isapi.dll"
•    After clicking the "OK" button, select the "Home Directory" tab. Toward the bottom change the "Execution Permissions" to read "Scripts and Executables"
•    Click the "Configuration..." button and a window called "Application Configuration" will open. Click the "Add" button. In the "Executable" field, browse to find "php5isapi.dll" again ("C:\PHP5\php5isapi.dll"). In the "Extension" type ".php" (do not forget the period "."). If the "OK" button is grayed out, just click in the "Executable" box and back to the "Extension" box until it shows up. This is a Windows problem. http://support.microsoft.com/kb/317948
•    Click "OK" to each of the windows until you are back to the "Computer Management" window.
17.    Open Windows Explorer and navigate to "C:\Inetpub\wwwroot". Create a text file called "test.php".
18.    Edit the "test.php" and enter the test phpinfo script code which can be found over here.
19.    In the "Computer Management" window, right-Click "Internet Information Services" select "All Tasks" and then select "Restart IIS..."
20.    Open Internet Explorer and in the address bar type this in
•    http://localhost/test.php
•    This should bring up your php information. If you scroll down, you should see a MySQL, GD and MBString section that we added.
21.    Go back to the "Computer Management" window and right-click the "Default Web Site" and click "Properties". (not "Web Sites"). Click the "Home Directory" tab and change the local path to "C:\Inetpub\wwwroot\drupal".
22.    Restart IIS.
23.    Open Internet Explorer and in the address bar type in:
•    http://localhost/install.php
This should be it. Have fun.

No comments:

Post a Comment