|
|
 |
| Installing PHP 5.2.3, MySql 5.0, IIS 6.0 on Windows XP |
 |
After hours of trying and re-trying and fustration, I finally installed PHP to work with MYSQL and IIS 6.0 Manager on a Windows XP machine. These are the steps I took. Hope that they work for you...
|
I installed PHP and MySQL on Windows XP platform with IIS 6.0. Please note if you are running IIS 5.0 Manager that comes with the Windows CD, the first thing I did was search google for "Download Microsoft IIS 6.0 Manager" and go to Microsoft to download and Install it. Once installed IIS 5.1 and IIS 6.0 manager will coexist in "Control Panel -> Administrative Tools". (I haven't used IIS7 so I cannot comment on it yet)
Also download the following 3 items:
(Read Article Download Disclaimer First) |
|
* Download PHP 5.2.3 ZIP File (9.47 mb): Click Here to Download
|
* Download MySQL 5.0 (39.7 mb): Click Here to Download
|
* Download MySQL 5.0 GUI Tools (17.7 mb): 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 from the URL of Internet Explorer.
|
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.
*** Click Here to See 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=root 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" 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!
|
|
|
Enter Feedback/Comment for this Article
Your Feedback
|
03/28/2008 - This is the best website for installing mysql. I recommend it to anyone who is having problem installing mysql. I followed the instructions and the install worked perfectly. After 2 days of working to install mysql properly I found this site. Deleted everything I had and started from scratch. Downloaded software from this site and followed directions. I can now focus on the website application instead of installing software - Kelly 03/12/2008 - Awesome article!!! Thanks a lot! I used it with the latest PHP package(php-5.2.5-Win32) and it worked perfectly! Make sure you don't name virtual directory "*.com" (it won't work in IIS). Restart IIS after MySql installation before running testmysql.php. - Irina 03/11/2008 - Thanks a lot for this great walkthrough. I spend hours with scanning articles and trying different settings before i found this article on your website. Great work, very easy and finally it works. :o) - Mike - Mike 03/05/2008 - Excellent article. Thanks so much. Was reading PHP.net's site to try and work out how to get MySQL to work without any luck. Your instructions worked perfectly. - Alison 03/04/2008 - Looked for weeks. Works like a champ! - Doug 03/03/2008 - Thanks man, I wasted almost an entire weekend on this, your steps worked perfectly! - Josh 02/20/2008 - Thank you for the great tutorial! - Boaz 02/18/2008 - ur all information very usefull .it help me alot.but i want to know that how configure all these on win 2000 and 2003.may be there some other things which u not mension here. - anju 02/12/2008 - What a lifesaver. By far the best tutorial about getting mysql to play nice with php. Thanks you - hellsyeahHNB 02/05/2008 - You have done great work. Keep it up. But i have one issue that is drving me nut. I can create database/table using MySQL and can execute it using the php in the browser, but I cann't add/delete data into/from the MySQL databe using the PHP browser. Any hint! - C 02/02/2008 - Thank you, thank you!!! It finally worked! At first i thought there was something wrong with my installation, but when i highlighted Default Web Site in IIS, i noticed that phptest.php was named phptest.php.txt... darn! Anyway, great job at this tut. Much appreciated! - Alex 01/28/2008 - Thanks. This got it working. Clearly set out.
Danny Crossley.
www.mammothobsequious.com - Danny 01/25/2008 - Hi, You have done a very good job.. its helpful for me.. thanks a lot - Nidhi 01/23/2008 - Have one issue that i am working through and any help you might be able to offer would be greatly appreciated.
From the CLI the database connection works great, but from a webbrowser it wont connect and throws a cant create tcpip socket(5) - Nate 01/18/2008 - Great Work,Very systematic & very helpful.Come up with php on linux Good job - Sanjeev 01/17/2008 - Perfect. After 2 days of pulling hair out, these instructions work perfect!!
Thanks - Dave 01/16/2008 - You are the best - El 01/15/2008 - Amazingly clear and accurate where all others leave you dazed and confused. Thank you, thank you, thank you!!! - chadd 01/07/2008 - Just tested this install on W2K3 server with IIS 6.0/PHP/MySQl and the new FastCGI.. works KICKASS. Minor tweaks with the .dll file for FastCGI.dll's instead of the ISAPI.dll's. Love it! Your MYSQL test is simple and effective. I found this site because I couldn't figure out if MySql was functioning correctly. YOU ROCK! Thank you. If you ever need any Porsche work.. let me know :) - BradR 01/05/2008 - Thank you for your article on this,very clear and easy to follow.
I normally can not get my head around most instructions that are written on the net, I would be here for days if it were not for people like yourself.
I see I am not the first to praise your efforts and I doubt I will be the last. - Jason 01/03/2008 - THANKS!!!!! the extension_dir setting wasnt set properly for me and I didnt see that in any other post.!
You saved the day! - Jon 12/27/2007 - I spent nearly a week to make the three; php, mysql and iis work together but with no luck. If php and iis worked then mysql would create problem.but your tutorial managed to harness the three together in less then an hour.Thank you ...........thank you and thankyou again and again. rajvir - rajvir 12/27/2007 - i install php an my sql as ur stepa.i also write script for the connection.there is not any error ther but it is not display anything on my ie.and i install xp sp-1 with iis6.0 - niral 12/11/2007 - Great article. It's always the shocking looking sites that have the useful stuff. Well done. - Steve 12/06/2007 - Wow. You just answered all my questions on how to get php and mysql working on XP. Your directions were flawless... works perfectly. I must have spent 6 hours screwing around helplessly on this until I came across your step-by-step instructions. Now if I can only get ImageMagick working on it too! Thanks a million!! - Mark 12/04/2007 - Great article but I have an issue still. All steps work fine, PHP install, MySQL install, reboot the server but when I try to load the page in IE7 on server 2003 it simply loads a blank page, no 404 just blank.! I know IIS can read PHP as the php test file is good?
Any ideas? - GB 11/23/2007 - Excellent article. Its save my lot of time. I was implemented wordpress blog using IIS 6.0 in windows server 2003 enterprise edition. Its run without error. Thanks once again. - Manoj 11/21/2007 - Thanks a lot,
this article was very helpful to me.
the important thing in this article is that it is very clear and precise to understand
Thanks again
Regards,
Mansoor Ali - Mansoor 11/21/2007 - THANKS! This saved me a lifetime. It's good to see a complete helpful install doc. - Andrew 11/19/2007 - Thank alot.. You are the best. I have tried so many places to find info to get the things to work. Your had no flaws. So straight forward and no errors..
I would recommend everyone to follow this instructions.. Thanks a mil. - Tito 11/19/2007 - thanks, like most people on here i've been pulling my hair out trying to configure php and mysql.
10 mins on this site has done what 5-6 hours on other sites couldn't.
Thanks - Peter 11/17/2007 - OH MY GOD!!!!!I have spent over a week going to like a million pages looking for help on this. Some places told me how to do all this crap and nothing happened, then I came to you and it was like 3 steps and BAM it works now. Thanks alot.
P.S. Most of those sites I went to was microsoft and IIS websites, They know nothing!! - Michael 11/12/2007 - Good on ya mate!!! thanks a ton - kunal 11/09/2007 - Absolutely Outstanding!!!! In less than 30 minutes, solved the installation, that I've have spent about ten hours on. Actually, I don't think I could have solved it without your instructions. The placement of the php.ini file in the windows directory and libmysql.dll in the system32 directory were KEY aspects of getting this to work. Previously, changing the path environment variables did not work . . .
Anyway, thanks for taking the time to do this. It is very much appreciated. - Rick 11/08/2007 - hello there!! this article really helps me,except to the last part when configuring php to work with mysql i believe i follow all the instructions but when i run the page it says that.
Unable to connect to database manager.
Could not connect: Access denied for user 'root'@'localhost' (using password: YES)
can anyone please tell me what went wrong and how to fix it.. - Erwin 11/03/2007 - Thanks, I was tearing my hair out trying to get them all installed and working on my laptop last night. A clear head this afternoon and a read-through of your article solved all my problems :) - dpmcalister 10/29/2007 - Amazing tutorial, I recommend this to anyone who what to host webpage using PHP.
This is totally fool proof!!!!
Thanks
Ben
- Benoy 10/26/2007 - Great instructions,keep up the good work! - tony 10/17/2007 - wow It help me a lot....Thank u v much! - vish 10/16/2007 - I was struggling with this issue for many days. Thanks to the author i found this. It helped me a lot. Great appreciation to this article. - Bulsa
10/10/2007 - Wow! Thanks so much. So much frustration followed by a huge sigh of relief. Thanks for your help! - Greg 10/08/2007 - this is a very nice straightforward documentation. But I am still unable to connect to mysql!! I have of all the steps with no luck. - mowali 10/05/2007 - Thanks. Very good article. - Sharky 10/04/2007 - I wish I had found your article before I started! Thank you very much for your help! - Dan 10/02/2007 - Awesome article dude ..
really solved my problem ... U Rock ..
Keep the great work going .. - ritesh 10/02/2007 - Unbelieveable after days of stuggling it actually works. It took me less than 20 mins to go through your instructions. I cannot thankyou enough for your comprehensive instructions!! Wish everyone could make things this easy - Kate 09/28/2007 - Cool - thanx for your contribution... did a lot of researching to resolve the connection issue until I tripped over your very pragmatic solution. There is a classic way to resolve the issue: include the path tp your php directory in windows environment variables - path.
Nevertheless your hint is gold worth! - Andreas 09/27/2007 - Wonderful!! Clear and easy to follow!! - p 09/20/2007 - Thank you for the great write up. I was missing libmysql.dll which was causing my issue.
FYI, if needed, if php.ini is not loading changes, to force a reload WITHOUT REBOOTING, kill w3pp.exe and let it fire back up.
You may need to stop/start iis afterwards. - Matt 09/17/2007 - I tried this on IIS5.0 running on Windows 2000 server and it worked perfectly. Thanks. - Lito 09/15/2007 - hi, thanks a lot and please help me ... i have installed every thing perfecly php,mysql,and IIS6 your all examples are working fine. but when i host my web site. only the main page is showing properly and all other pages are not viewing properly ... in IE6 and IE7 and mozilla firefox also. is there any thing to do in the configuration.flash is wokring fine. - Raghunath 09/14/2007 - So all I get is this tiny window? Oh, well. After many fruitless efforts, I finally got PHP snd MySQL installed, thanks to your very clear directions. A few points: 1) Why can't other software vendors write straightforward directions like this? 2) If, like I did, you already installed MySQL at some point, your attempt to remove it and reinstall it is not going to go as smoothly as described, because the removal procedure does not remove the original password; after removing MySQL through the normal Windows "remove programs" function, you should delete the entire "C:\Program Files\MySQL" folder, in order to remove the old password; 3) you may need to edit the C:\Windows\php.ini file that this procedure generates.
- Pink 09/13/2007 - for several days i have been tring to get connection to database through php. you have given simply way. Thank you .......... thank you..... thankyou verymuch - Surya 09/11/2007 - thas was the best easy way to install it ever I saw. I tried couple of other instruction, but none of them was as easy as this one.
- Ali 09/06/2007 - This was exactly what I needed - clear and concise. Thank you. - Andrew 09/05/2007 - Your info is very good, I'm going to use it for a MySql Installation in my Desktop and to make some test on it!!
Thx a lot!!
Greetings - KlimUser 09/04/2007 - Hi,
Just wondering why didnt you use IIS 5.1?
Regards
Alvin
- Alvin 08/31/2007 - Thanks for the guidlines. It really helpfull.
I was able to do it at one go.
Thank you verymuch - tulika 08/30/2007 - your php and mysql configuration is very helpful.
Thank you for sharing the information.
- daylan 08/24/2007 - Hi, your article on how to install php and mysql was very helpfull. I tried to install it on windows server 2003 r2. Many attempt but I just didnt got it to work. I read your article, followed your steps and it worked right away! Thanks!
Greetings Rien - Rien 08/24/2007 - Wonderful!!!!!!!!!!!!! - Debbie 08/23/2007 - You rock! Thank you very much. This was very helpful! - pwyon 08/21/2007 - This is the first article that really help me to create
a connection to Mysql.
Thank for help.
Walker Rivas - Walker 08/10/2007 - This dokumentation has really really helped me, after i failed with 3 other dokumentations... and now it works!!!
thank you very much - Joe 08/09/2007 - Thanks for helping me installing php5.2.3. and mysql.5.0 but I have one problem. All goes perfect with one exeption: my browser does not shoe my the error in case a write a incorrect php script. What should I do?
Thanks! - Dinu 08/01/2007 - Thank your manual this was very useful and saved the last few remaining hairs on my head. Very usefule and easy to follow instructions.
Cheeers - Nasser 07/26/2007 - thanksssssssssssssssssssss - ali 07/23/2007 - It just won't work for me and I feel I have done everything right. PHP worked once, the I tried to add MySQL and the whole thing just stopped working and I can't get it back now. Tried re-installing PHP 5.2.3 three times and no luck. There are so many settings in the php.ini file that I don't know what to do with.
Help? - Andrea 07/22/2007 - Great article. Jump started my PHP installation. I was getting nowhere before reading your article. However, in my case, I found that registery setting is necessary. I have to edit and run the pws-php5isapi.reg to make my installation work. I thought someone might have the same experience as me and looking for a solution and would like to help them just like you helped me : )
Cheers,
Ramins - Ramins 07/10/2007 - I need to download - only IIS 6 , or IIS 7... thnx... - Arton 07/07/2007 - I have tried MySQL with Kevin Yank(sitepoint) guide, but failed. At the same time your article helped me succeed at first try. Thank you very much. - G. 06/28/2007 - THis article was perfect man thanks a bunch ive been trying to setup this thing for a week without success and your way got it done in 10. Kudos to you - Sadiki 06/27/2007 - Excellent tutorial! a life saver! - Fionnuala 06/27/2007 - Thanks alot!
Works like a charm! - Robert 06/19/2007 - Thanks much. I had determined everything except copying the libmysql.dll to windows/system32 and had been pulling my hair out till I found your page. Thanks again. - chris 06/19/2007 - Hi, PHP Part
Step 4: Create a test file in the root of your web folder called "phptest.php" and insert the code below:
phpinfo();
?>
This part had me fooled for hours... Changed it to
Then it all worked great... - Mark
|
|
|
|
Home / Website Map /
Bookmark Page
/ Privacy Policy /
Kakuro
Copyright © 2008 ATK Solutions, Inc. All Rights Reserved
|