<$BlogRSDUrl$>
Techno Hack
All about technology tips and trick around us, such as how to optimize our PC, camera, handphone, camcorder and much more

Learn to install Apache 2, MySQL 5, PHP 5, phpMyAdmin 2 and Zend Optimizer 3 on Windows XP (Install PHPmyAdmin)

Monday, July 03, 2006
In this article we’re going to learn how to install phpMyAdmin with our new server tools so we can better manage our MySQL database. There are a few things in this article that may not seem correct or right and some users may have phpMyAdmin working very easily, it all depends on your setup.

First let’s start by extracting the files to the proper location. Start by opening the phpMyAdmin zip file we downloaded in the beginning. Extract all of these files into the “htdocs” folder under the folder name “phpMyAdmin”. This will help us to keep up with where it’s installed, so now once we’ve unzipped everything we could load it up by using our favorite browser and point it to :

http://localhost/phpMyAdmin/index.php



The error message that displayed above means that we didn't include MySQL library to PHP configuration

To adding MySQL library to PHP configuration, just follow these steps:
1. Open PHP configuration file (php.ini) at c:\server\PHP using your favorite text editor (such as notepad)
2. Search for this syntax: ;extension=php_mysql.dll
3. If you found it, just delete the comment character (;)
4. Save the file and restart the Apache webserver. After that, try to run the phpMyAdmin again from your browser
5. If it's come with the same errors, then it means Apache couldn't find libmysql.dll file (this file is require for php_mysql.dll). Actually, this file is located at c:\server\PHP
6. So, we must change the Windows path to that location.
7. Go to Control Panel and open the System icon (Start -> Control Panel -> System)
8. Go to the Advanced tab
9. Click on the 'Environment Variables' button
10. Look into the 'System variables' panel, and highlight Path variable by click on it
11. Click Edit button, and at the Variable value, at the end of the syntax, add this code:
     ;c:\server\PHP
12. Click OK and restart your computer
13. Try again to run the phpMyAdmin from your browser



This error message means that our login or password to connect to mysql database is wrong. In order for phpMyAdmin could connect to mysql database, we must supply the login and password at phpMyAdmin configuration file.

Almost all configurable data is placed in config.inc.php. This file only needs to contain the parameters you want to change from their corresponding default value in phpMyAdmin/libraries/config.default.php. If config.inc.php does not exist at the phpMyAdmin directory, just copy config.default.php from libraries directory to phpMyAdmin directory, and rename it to config.inc.php.

Locate this string: $cfg['PmaAbsoluteUri'] = '';

Inside the ' ' place the location of where phpMyAdmin is installed on the server. In this case we installed it within the root directory under its own folder name. So we’ll use “http://localhost/phpMyAdmin/” as our absolute URL location.

There are 3 authentication methods that we can use to connect to phpMyAdmin:

1. config method (the default method)
This method is the least secure, as it requires storing your MySQL username and password in the file on the server. Anyone who would find the directory to your phpMyadmin installation would then be able to access your databases. This is the default method, however.

If you use the 'config' authentication method, it is strongly recommended that you secure the directory in which phpMyAdmin is installed, such as adding password protect to phpMyAdmin directory. This extra step is not needed when using either the 'http' or 'cookie' authentication methods.

Locate this string: $cfg['Servers'][$i]['auth_type'] = 'config';
Locate this string: $cfg['Servers'][$i]['user'] = 'put your MySQL login here';
Locate this string: $cfg['Servers'][$i]['password'] = 'put your MySQL password here';

2. http method
These methods are more secure, as your username and password are not stored on the server in your configuration file. The 'http' option uses the Apache http authentication method.

Locate this string: $cfg['Servers'][$i]['auth_type'] = 'http';
Locate this string: $cfg['Servers'][$i]['user'] = '';
Locate this string: $cfg['Servers'][$i]['password'] = '';

3. cookie method (recommended method)
These methods are more secure, as your username and password are not stored on the server in your configuration file. The 'cookie' method uses cookies, and has the advantage that you can "Log Out" at the end of your session, deleting the cookie.

Locate this string: $cfg['Servers'][$i]['auth_type'] = 'cookie';
Locate this string: $cfg['Servers'][$i]['user'] = '';
Locate this string: $cfg['Servers'][$i]['password'] = '';
Locate this string: $cfg['blowfish_secret'] = 'fill anything here';

For the blowish_secret values, you can fill any alphabets, in example you can use 716e3c0.88759346, but, keep in mind that the maximum length seems to be 46 characters. The passphrase is just used internally to encrypt the password - you will not be prompted for it later.


After we've finished configuring phpMyAdmin, try to run phpMyAdmin again by using our favorite browser and point it to http://localhost/phpMyAdmin/index.php



This error tell us that mbstring library didn't load at PHP. Without mbstring extension, phpMyAdmin is unable to split strings correctly and it may result in unexpected results.

In order to load mbstring library, we must do:

1. Open PHP configuration file (php.ini) at c:\server\PHP using your favorite text editor (such as notepad)

2. Find this syntax:
;extension=php_mbstring.dll

3. Delete the comment character (;)

4. Save the file and restart the apache

5. Try to open up phpMyAdmin again



If you’re able to login with no errors, you'll get the result like the image above, but it will be a bit different depending on your language setting. I've use Indonesian language setting.


 << Install PHP   Install Zend Optimizer >> 

INDEX SHORTCUT