TUTORIAL: How to install PHP and MySQL on IIS

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Your question isn't entirely clear. The only part that I know of in the install that would require internet access is where you are prompted to register with MySQL.org That is an optional part of the install. You can skip that.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • malakite
  • Born
  • Born
  • malakite
  • Posts: 3

Post 3+ Months Ago

yeah i got that and skipped it!
basically after hitting execute button,
It has frozen up during the final step (MySQL Server Instance
Configuration).

I'm installing it on Windows XP, and I used all the
default settings, except that I changed "Detailed Configuration" to
"Standard Configuration".

At the "Start Service" item in the checklist,
I got a 1045 error message saying to allow TCP port 3306.

also after re-running it, it puts a red 'x' in the "Start service" checklist and says "The service could not be started. Error: 0"

i dont know what is wrong
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

It's because the service was most likely already running. I remember running into that a couple times myself. If I recall correctly, just reboot the computer and you should be fine.
  • dyfrin
  • Expert
  • Expert
  • User avatar
  • Posts: 503
  • Loc: WI

Post 3+ Months Ago

As part of the install:
Make sure you update the mysql client for php.

After installing mysql copy libmySQL.dll from the mysql installation to the c:\php directory, overwriting the previous.
  • malakite
  • Born
  • Born
  • malakite
  • Posts: 3

Post 3+ Months Ago

Thanks a lot everyone! i got it working by using DOS commandline, thanks again.
  • Jepps98
  • Graduate
  • Graduate
  • User avatar
  • Posts: 149
  • Loc: Umm, not exactly sure...

Post 3+ Months Ago

Umm, I need the username and password? What would it be?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

username is: root. Unless you set a password during install there is no default password. Just leave it blank.
  • Jepps98
  • Graduate
  • Graduate
  • User avatar
  • Posts: 149
  • Loc: Umm, not exactly sure...

Post 3+ Months Ago

Cant get it to work... And I didnt set a PW
  • Evenhost
  • Graduate
  • Graduate
  • User avatar
  • Posts: 184
  • Loc: Florida

Post 3+ Months Ago

its great to see a PHP how to guide. I just went through instaling a php database and it was a pain the but to do on my own with only basic knowledge. I found this just a day too late :)
  • joeshmoe2469
  • Born
  • Born
  • joeshmoe2469
  • Posts: 1
  • Loc: washington

Post 3+ Months Ago

can any one tell me about overclocking my com
  • suzannehami
  • Born
  • Born
  • suzannehami
  • Posts: 2

Post 3+ Months Ago

Hi
I'm very frustrated :-(
I've followed the instructions for installing all the bits.
MySQL works
PHP works
My IIS works
MySQL Admin Tool works
phpMyAdmin doesnt work :-(

I'm continously getting the

Cannot load mysql extension. Please check your PHP configuration. - Documentation

error - my php.ini file looks like this (at the moment, but has looked several different ways)

; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:/PHP/ext"
extension=php_mbstring.dll

My config.inc.php file looks like this:

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pmausr';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';


should i add in the other bits from the instructions to the config.inc.php file?
ie. these bits:

$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?

$cfg['Servers'][$i]['user'] = 'root'; // MySQL user

$cfg['Servers'][$i]['password'] = 'yourpassword'; // MySQL password (only needed

// with 'config' auth_type)

cos my config.default didnt have them so i didnt add them, could this be the problem?
I've tried moving the php_mbstring.dll file to different places within the php folder but no luck ... I'm completely baffled as to why this isnt working.
Thanks for any help
Sue
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Under Windows extensions in php.ini uncomment

extension=php_mysql.dll

Make sure php_mysql.dll exists in the extensions folder.
  • suzannehami
  • Born
  • Born
  • suzannehami
  • Posts: 2

Post 3+ Months Ago

hi
Thanks for that, it worked.
I now have a new problem - I know I should try to find the answer myself but I'm hoping you'll know quickly and save me a few hours searching and experimenting :-)
Anyway, now I've got the error

MySQL said
#2003 - The server is not responding

I know the server is working (IIS)

where do i need to go to fix this?

Thanks
Sue
  • imranahmed
  • Newbie
  • Newbie
  • imranahmed
  • Posts: 8
  • Loc: UK

Post 3+ Months Ago

Nice tutorial, realy helped me in configuration. I was stuck from many days to do setup. thanks again
  • zengqiang
  • Born
  • Born
  • zengqiang
  • Posts: 1

Post 3+ Months Ago

thank you for your tutorial.
  • compaqras
  • Newbie
  • Newbie
  • compaqras
  • Posts: 8

Post 3+ Months Ago

i follow the steps but when i type link of some php file, it give option to download instead to run the script. any clue, why is that.
  • Zackeriney
  • Graduate
  • Graduate
  • Zackeriney
  • Posts: 128

Post 3+ Months Ago

brillaint ill try this later cheers
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

compaqras wrote:
i follow the steps but when i type link of some php file, it give option to download instead to run the script. any clue, why is that.


You have to register the php extension in IIS. Instructions are provided in this link
http://www.microsoft.com/technet/archiv ... x?mfr=true
  • Zackeriney
  • Graduate
  • Graduate
  • Zackeriney
  • Posts: 128

Post 3+ Months Ago

i get

phpMyAdmin - Error
Cannot load mysql extension. Please check your PHP configuration. - Documentation


mysql.dll exists in the ext dir and i have uncommented it in php.ini, everything else is working i think but thats not :S
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Reboot your computer or restart the MySql service.
  • Zackeriney
  • Graduate
  • Graduate
  • Zackeriney
  • Posts: 128

Post 3+ Months Ago

Nice guide, everything else works but i get

phpMyAdmin - Error
Cannot load mysql extension. Please check your PHP configuration. - Documentation
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

What version of MySql and PHP are you installing?
  • Zackeriney
  • Graduate
  • Graduate
  • Zackeriney
  • Posts: 128

Post 3+ Months Ago

Iv uninstalled it all now am going to start from fresh. i dont really need that to work just trying to get java to work. i have 5 java files that were sent to me and i cant get them to work on tomcat. also when i go to http://x.x.x.x:8080 i get the router admin login when im on the local network so it is really annoying to rest. if ido localhost:8080 or 192.168.0.2:8080 it will work :s it always used to work just doing my external ip, but dosnt now on my new pc.

i am installing the latest of both whichever versions that is.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

For php 5 the following should be uncommented in the extensions list

extension=php_mysql.dll
extension=php_mbstring.dll

(note there is a difference between mysql.dll and php_mysql.dll

Make sure the path to the extensions directory is correct and make sure php_mysql.dll and php_mbstring.dll exist in the extensions directory.
  • Zackeriney
  • Graduate
  • Graduate
  • Zackeriney
  • Posts: 128

Post 3+ Months Ago

cheers will try later because one of my websites hasnt got hosint at the moment

where is the extensions folder? i couldnt find it last time so just left it
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

You need to download the php 5.2.1 Windows Binaries from the download page and unzip it to the PHP folder. (it contains the extensions folder and the extensions. The Windows install file does not include them - they need to be added separately)

http://www.php.net/downloads.php
  • xxkmanxx
  • Born
  • Born
  • xxkmanxx
  • Posts: 1

Post 3+ Months Ago

is there any tutorial on how to install PHP and MySQL on the new IIS 7.0 on Windows Vista?

thanks
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Not here at OZZU, no. And unfortunately I don't have IIS 7.0 or Vista yet to mess around with it.
  • brentv911
  • Born
  • Born
  • brentv911
  • Posts: 1
  • Loc: Clinton, IA

Post 3+ Months Ago

I'm not well versed in any of this.. I'm trying to install and learn PHP but i'm using Windows Server 2003. I followed the instructions on installing PHP but for some reason when I create the test file and place it in the wwwroot folder, it doesn't work.

Any ideas?
  • iceberg11
  • Born
  • Born
  • iceberg11
  • Posts: 1

Post 3+ Months Ago

Zackeriney wrote:
i get

phpMyAdmin - Error
Cannot load mysql extension. Please check your PHP configuration. - Documentation


mysql.dll exists in the ext dir and i have uncommented it in php.ini, everything else is working i think but thats not :S


I get the same thing, php_mysql.dll is unquoted, everything was done, i get the test to work, the setup.php to show, but index.php show that message. I check my extension folder, it was set corrected for C:/php/ext so I don't know what else I'm doing wrong. Please help


Nevermind, solved it by moving php.ini to windows directory. Argghhhhhh...wasted alot of my time.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 142 posts
  • Users browsing this forum: No registered users and 73 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.