Articles
Install and configure phpMyAdmin on IIS
Now that you have installed and configured PHP 5 for IIS along with your 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 3.x 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
First thing to do after you download and extract phpMyAdmin is place the extracted files in the appropriate directory inside your IIS web root so that IIS is able to access it. You may wish to create a separate website for your phpMyAdmin installation, or simply add it as a sub directory or virtual directory under an existing website. Either way you'll need to make sure that the user account used by IIS to access your files has at least NTFS read permissions to all of your files once they are in place.
In this guide we'll place the phpMyAdmin files in a directory called "pma" under the root directory of a website "example.com". Because phpMyAdmin enables you to directly manipulate, and even delete entire databases and users, it is highly recommended that you secure your phpMyAdmin installation using SSL. This can be done by purchasing a certificate from a 3rd party vendor which will cost money, or by creating self signed certificate for IIS yourself at no cost. With all this in mind, then to access the phpMyAdmin installation used in this guide you would type the following into the address bar of your favourite web browser;
Obviously you'd need to alter this URL to reflect your own 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 on my web hosting)
- 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.dllSimply 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.
- Add new comment
- 268364 reads

Comments
Make sure you have set up
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
help still lost
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
help still lost
forgot one my email
Ok, for a start you're
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
lets try again
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.
Error
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 ;):)
Two things to check; 1) Is
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
MySQL extention error
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
thanks
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
I gather you mean you have
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