Install and configure phpMyAdmin on IIS

Now that you have installed and configured PHP 5 for IIS and configured MYSQL 5 Server, it's time to start doing something useful with it. And where better to start the the enormously useful phpMyAdmin tool written in PHP to manage just about all things MySQL via a web interface. phpMyAdmin is the veritable swiss army knife for all your MySQL administration needs, all conveniently package in a easy to use web interface. Don't just take my word for it, phpMyAdmin just won best Best Tool or Utility for SysAdmins in this years Sourceforge Community Choice Awards. You get the idea then, it is pretty good. In this guide we'll show you how to install and configure phpMyAdmin 2.11.0 in your IIS environment. This guide assumes that you have already installed and configured PHP and MySQL which are required for phpMyAdmin to work. If not, then these guides can be found in the "How To Guides" section of this site.

Installation

As with just about everything in I.T. there is more than one way to skin a cat, and the installation of phpMyAdmin is no different. Like most popular PHP applications these days, phpMyAdmin comes with a web based interface aimed at aiding the user through the process of configuring all the settings required for operation. However, unlike the pretty installers such as those found in other PHP applications such as Drupal, Joomla or Wordpress where the user is asked a series of sequential questions to establish these settings, phpMyAdmin more or less has a single page with a load of buttons on it. While the experienced system admin or phpMyAdmin user might find this perfectly adequate, I'm not entirely convinced how much more streamlined or helpful this is to those new to the phpMyAdmin world. Personally I still prefer to just manually edit the config file, which is what I'll be covering in this guide. Those wishing to have a look at the setup script can do so by navigating to the /scripts/setup.php in their phpMyAdmin installation.

PHP Settings

phpMyAdmin uses several PHP extensions to perform its various functions. The extensions you'll need for phpMyAdmin are;

  • MySQL (to connect to the MySQL server)
  • MCrypt (highly recommended for performance when using the cookie authentication method, and actually required for 64-bit environments)
  • MBString (used for multi-byte character support)
  • GD2 (image creation and manipulation library)

To enable these extensions open you php.ini file and navigate to the list of extensions and find these extension names;

;extension=php_gd2.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mysql.dll

Simply remove the semi-colon (;) from that start, save the file and restart IIS to reload your PHP environment. These extensions should now be loaded into your PHP environment, and can be verified using the phpinfo function as described in the PHP installation guide.

Average rating
(7 votes)
|
Submitted by Dominic Ryan on Fri, 2007-09-07 00:14.
Anonymous | Sun, 2007-09-30 07:56
Anonymous's picture

I just got phpMyAdmin installed perfectly following your guide .. & I just wanted to thank you .. So,

Thank You ..

Brashquido | Sun, 2007-09-30 12:31
Brashquido's picture

Thanks for the comment. Happy the guide was able to help out!
----------------
Dominic Ryan
3 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Anonymous | Thu, 2007-10-18 10:29
Anonymous's picture

Hi,

First of all i would like to say that this tutorial is one of the most detailed ones I've come across...
I tried many tutorials and finally tried yours...

I've got the MySQL and PHP running... No probs there.
But when I unzip the phpmyadmin to a folder, make the changes to the config file and try to open the site. the troubles start...

Sometimes it opens, sometimes it doesn't. It also doesn't show the nice colors it normally has.
When I give in the credentials for the MySQL it tries to login... but no effect. It seems to hang or gives me the page not found error. After I got this error The site doesn't load at all. I need to reboot the IIS to get back some action...

I downloaded and installed:
mysql-essential-5.0.45-win32.msi
php-5.2.4-Win32.zip
pecl-5.2.4-Win32.zip
phpMyAdmin-2.11.1.1-all-languages.zip

I also have ActivePerl installed... maybe that's the "badass"?

This all I've got installed on a clean W2K3 Server machine with all updates, .NET Frameworks and IIS notging more...

Do you have any idea?

Thanx

Brashquido | Thu, 2007-10-18 12:17
Brashquido's picture

Sounds like a permissions issue to me, maybe something to do with your PHP environment. Sorry I don't have an answer off the top of my head, so it looks like we're going to have to do some digging. Things I would check are;

- Event Viewer
- PHP Log
- IIS Log files

----------------
Dominic Ryan
3 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Anonymous | Thu, 2007-10-18 13:28
Anonymous's picture

I checked the Event Viewer and this it wat it said:

2 errors eventid 2214 and 2268
2214 says it can't load the php_mysql.dll
2268 says it can't load all the isapi filters

I'm not sure where to find the PHP log or the IIS log...

But i know i need to do something about the 2 errors I mentioned before.
Not sure how to fix it.
I'll keep you posted.

Thanx a lot for the help already :-)

Kindest regards,

Stijn

Brashquido | Thu, 2007-10-18 14:48
Brashquido's picture

Ok, first thing I would be doing is double checking the extension_dir directive in php.ini, and perhaps try entering the absolute path if you haven't done so already. Also make sure you only have the bare essential PECL extensions loaded (as described in the guide) until this is sorted.

Your php log is defined in your php.ini file, and your IIS log files are located by default in %windir%\system32\logfiles
----------------
Dominic Ryan
3 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Anonymous | Fri, 2007-10-19 11:45
Anonymous's picture

Thanx a lot for the help.
I completely uninstalled PHP and reinstalled PHP.
PHPMyadmin afterwards wasn't a problem anymore.

Great help, good tutorial.

Thank you,

Kindest regards,

Stijn

yeutragop | Tue, 2008-04-01 12:17
yeutragop's picture

The Tutorial is no longer there can some one please repost it thanks so much for your time

Best Regards,

yeutragop

Brashquido | Tue, 2008-04-01 08:44
Brashquido's picture

Thanks for notifying me yeutragop. Should be fixed now.
----------------
Dominic Ryan
4 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Anonymous | Fri, 2008-04-04 18:50
Anonymous's picture

this is it i can figure out everything installed but i cant get to myadmin. im new to server but not to the program. i can see phpinfo but when i got php myadmin i get Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. im not sure about the logs either.please in you can help me. other than that i love ur guieds there great.

Brashquido | Sun, 2008-04-06 18:47
Brashquido's picture

Make sure you have set up your sessions directive in php.ini as detailed on page 4 of my guide on installing PHP 5 on IIS in 5 simple steps
----------------
Dominic Ryan
4 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Anonymous | Sun, 2008-04-06 19:05
Anonymous's picture

well everything is exactly done as the guide says to but still no luck. id be happy if you looked at the php info, maybe you can see the issue. my site is http://keeper695.no-ip.org

Anonymous | Sun, 2008-04-06 19:07
Anonymous's picture

forgot one my email

Brashquido | Mon, 2008-04-07 10:39
Brashquido's picture

Ok, for a start you're running PHP 5.2.5RC4. The RC4 indicates you are running release candidate 4, i.e not yet production stable. As you're just starting out I'd highly recommend you stick with the latest stable build, which at present is PHP 5.2.5. Two other things, have a look at the "upload_tmp_dir" value in your php.ini file as it looks as if it is loading a good chunk of your php.ini file instead of just the path to your uploads directory. Finally, can you let me know what users/groups have permissions to you upload and session directories?
----------------
Dominic Ryan
4 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Anonymous | Tue, 2008-04-08 06:14
Anonymous's picture

i have made a chose that i am good with. Due to the fact that i am new to server 2003 i have this habit that allot of people most likly do and thats play and learn. i am going to clear the system and redo it. This way i can start from scratch with what i have learned. This time though i am going to come right back to the guides that you have writen i thank you very much for the time and help. you have been great, and believe you to be a very noble person for taking the time to help. I know that with the work you do and have acomplished it takes a good hearted person to offer there time to other. thankyou and ill be leting you know how it goes
thanks again -tim
ps. you dont have to post this i just want to say it.

Anonymous | Fri, 2008-04-11 14:59
Anonymous's picture

I'm trying to install phpMyAdmin on iis7 and having done the same as i have done before, everyone time i go and test http://localhost/phpMyAdmin i get the error

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

I have followed all the tutorials for setting up php and that works fine, but phpMyAdmin will not ....

Any suggestions please ;):)

Brashquido | Sat, 2008-04-12 12:14
Brashquido's picture

Two things to check;

1) Is the MySQL/MySQLi extension loaded in php.ini?

2) Is your php.ini been loaded?

----------------
Dominic Ryan
4 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Anonymous | Sat, 2008-04-19 20:06
Anonymous's picture

Hi, I found youre tutorial and read it through. I also read through the PHP and MySQL tutorials and that worked. I can acces the phpinfo.php page and it loads perfectly. The tutorials are very helpfull.
Whenever i want to load phpmyadmin i get this error:

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

I checked the php.ini in my php directory and it has php.mysql.dll and php.mysqli.dll enabled.

I really hope you can help me with this problem cause i need phpmyadmin to manage my MySQL server.

Thanks in advance

Walter

Anonymous | Sun, 2008-04-20 20:39
Anonymous's picture

sorry it took so long to get back but as soon as i fixed the server my using the right programing i didnt stop. Like i said i have a bad learning curve and you made it so even i could learn to set this up right. thank you again and please feel free to visit again it thank to you that it works.
http://keeper695.no-ip.org

Brashquido | Sun, 2008-04-20 22:10
Brashquido's picture

I gather you mean you have php_mysql.dll and php_mysqli.dll enabled in php.ini? Perhaps try only loading one of them, and check your php info page to ensure that the correct php.ini file is being loaded, the extensions are being loaded correctly and that the extensions directory is correctly defined. Have a read of my article on enabling PHP PECL extensions for Windows for further information.

----------------
Dominic Ryan
4 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Anonymous | Thu, 2008-04-24 16:56
Anonymous's picture

that's a great tutorial....................very useful.Cab you tell me how to
configure SSL connection in phpMyAdmin with 'cookie' authentication?

Brashquido | Sun, 2008-04-27 19:45
Brashquido's picture

Are you wanting to secure the connection between your PHPMyAdmin server and MySQL, or between PHPMyAdmin and your browser?
----------------
Dominic Ryan
4 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Anonymous | Sat, 2008-05-10 20:31
Anonymous's picture

thanks sir i 've did what you said in this great topic but i got this problem

phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly

what i do in this case

thanks in advance

Brashquido | Sat, 2008-05-10 23:43
Brashquido's picture

Make sure the IIS user account has write permissions to the directory you've set to save your sessions in php.ini .
----------------
Dominic Ryan
4 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Anonymous | Mon, 2008-06-16 22:53
Anonymous's picture

When I try to run the file "create_tables_mysql_4_1_2+.sql" I get the following error
Error
No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.

Brashquido | Tue, 2008-06-17 00:18
Brashquido's picture

Have you checked out the information in FAQ 1.16?
----------------
Dominic Ryan
4 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Anonymous | Mon, 2008-06-30 05:47
Anonymous's picture

$cfg['docSQLDir'] = 'docsql';
$cfg['ShowPhpInfo'] = true;
$cfg['ShowChgPassword'] = true;
$cfg['AllowArbitraryServer'] = false;
$cfg['LoginCookieRecall'] = 'something';
$cfg['LoginCookieValidity'] = 1800;
$cfg['AllowAnywhereRecoding'] = true;
$cfg['DefaultCharset'] = 'iso-8859-1';
$cfg['RecodingEngine'] = 'iconv';
$cfg['IconvExtraParams'] = '//TRANSLIT';
$cfg['GD2Available'] = 'yes';
--
where to copy all these plz

Brashquido | Mon, 2008-06-30 10:57
Brashquido's picture

Copy these settings into your config file as detailed on page 2 of the guide.
----------------
Dominic Ryan
4 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Post new comment

  • Use <!--pagebreak--> to create page breaks.
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use BBCode tags in the text, URLs will automatically be converted to links.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Copy the characters (respecting upper/lower case) from the image.