| |
| * PHP 5.2.9-1 installer [17,304Kb]: Click Here to Download | |
| * Download MySQL 5.0 : Click Here to Download | |
| * Download MySQL 5.0 GUI Tools : MySql 5.0 GUI Tools (Tools to help you administer database) | |
| INSTALLING PHP | |
| Step 1: Configure IIS 6.0 to point to a local folder where your webfiles. Don't forget to create a file called "index.htm" (or index.html) add some HTML like a picture or fancy text font. Once you configure it, you should be able to see it by typing http://127.0.0.1/ or http://localhost/ from the URL of Internet Explorer/FireFox. | |
| Step 2: Create a folder on C: called "PHP" and unzip the files from the PHP download into that folder. You should see a a bunch of DLL's and additional sub-folders called "ext", "extras" and "dev" with files in there as well. | |
| Step 3: Open IIS6 Manager Right Click -> Default Website -> Properties -> Select Home Directory -> Select Configuration. On Application configuration check to see if .php is in list. If not click "Add". For executable browse to "c:\php" folder and select "php5isapi.dll". Click "OK" and then "OK" again. *** Here is the Visual Illustration on this Step *** | |
| Step 4: Create a test file in the root of your web folder called "phptest.php" and insert the code below: | |
| Step 5: In the "C:\PHP" folder copy the file "php.ini-recommended" to your C:\WINDOWS folder. Rename this file to "php.ini" | |
| Step 6: Reboot the computer. Once fully rebooted in the URL bar of IE, type "http://127.0.0.1/phptest.php" and you should see it give you information about the PHP version. If you see this then you know it worked properly and PHP is installed successfully! | |
| INSTALLING MYSQL | |
| Step 1: Install MySQL 5.0. | |
| Step 2: Install MySQL 5.0 GUI Tools. These will allow you to view your databases and data structures | |
| Step 3: Configure an Instance: The best way I configured it to work successfully was once it was installed to go into the "MySQL Server Instance Configuration Wizard" and click "Detailed Configuration", "Developer Machine", "Non-Transactional Database Only", "Decision Support (DSS)/OLAP", "Check Enable TCPIP Netwokring", Port 3306, "Standard Character Set", "Install as a Windows Service", Give it a main password that you remember like "root", Click "Execute!!". *** Please note your username will be "root" and password will be whatever you typed (in this example "root"). After you hit "Execute", You should see 4 buttons light up with no red 'X's and you know MySql is configured correctly! | |
| Step 4: Open the MySQL Administrator program. Set server host = localhost, username=root and password=ksbalu or whatever you set it to. Click on catalogs, if you see "mysql" then that is a main database. This means that MySQL is installed properly!! | |
| CONFIGURING PHP TO WORK WITH MYSQL | |
| Step 1: In the C:\PHP folder copy the file "libmysql.dll" to your C:\WINDOWS\SYSTEM32 folder. Make sure you don't overwrite any existing file in this folder. If file exists, first rename it so you can go back. *** Why IIS simply does not read the PHP directory? ...I do not know *** | |
| Step 2: Edit this file "php.ini" that you copied to your C:\WINDOWS folder using a text editor like notepad. Find the line where it says "extension_dir = *something*". Uncomment this line by removing the preceding semi-colon. and set it to say: extension_dir="c:\php\ext" | |
| Step 3: In the same file "php.ini" also un-comment out 2 other lines by removing semi-colon. Find the lines where it says: extension=php_mysql.dll and extension=php_mysqli.dll and uncomment both lines by removing the semi-colon. | |
| Step 4: Reboot the computer | |
Step 5: I have provided a simple PHP script to test database connection to MYSQL. Copy and paste this into a file call it for example: "testmysql.php" "); die('Could not connect: ' . mysql_error()); exit(); } else { echo("Successfully Connected to MySQL Database Manager! "); } if (! @mysql_select_db("mysql") ){ echo( "Unable to connect database... "); exit(); } else { echo("Successfully Connected to Database 'MYSQL'! "); } ?>and place it into the web root folder (same folder as "phptest.php") | |
| Step 6: If you run this script by typing: http://127.0.0.1/testmysql.php and it says "Successfully Connected to MySQL Database Manager!" and "Successfully Connected to Database 'MYSQL'" then this means that MySQL is now communicating with PHP and is installed and working properly!!! Hope it helped! |
Wednesday, April 1, 2009
Installing PHP 5.2.3, MySql 5.0, IIS 6.0 on Windows XP
Subscribe to:
Post Comments (Atom)



No comments:
Post a Comment