FeedBurner StumbleUpon  Del.icio.us  Facebook  Reddit  Add to diigo  

Follow - Monx007
Article Time Stamp: 06 January 2010, 19:05:50 GMT+7

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

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 :


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:
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.

Note: For phpMyAdmin version, eventhough there's a config.sample.inc.php file, it better to use the config.default.php file as your starter configuration file.

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.

Notes: On 64 bit systems the mcrypt PHP extension is required for auth_type "cookie". The alternative blowfish routines only work on 32-bit systems at the moment (due to a PHP 5.2.0/1 bug, should be fixed in PHP 5.2.2 meanwhile). The same issue leads to the cryptic "#1045 access denied for user www-data.." messages on Ubuntu boxes.

NOTES on phpMyAdmin
You can copy the configuration file from phpMyAdmin/libraries/config.default.php to phpMyAdmin root directory and rename it into config.inc.php. After that, since at this version, the auth type has been set to 'cookie' method, you may want only to insert the 'blowfish secret' code.

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:

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.

6. You should deny access to the libraries subfolder in your webserver configuration. For Apache web server, you didn't have to do anything, because in library folder there is already .htaccess file that we can use. Such configuration prevents from possible path exposure and cross side scripting vulnerabilities that might happen to be found in that code.

For phpMyAdmin version, you can use the Wizard to setting up the phpMyAdmin configuration file. First you must manually create a folder config in the phpMyAdmin directory. This is a security measure. And to edit an existing configuration, copy it over first: config.inc.php file.

Next, open setup/ in your browser. Note that changes are not saved to disk until explicitly choose Save from the Configuration area of the screen. Normally the script saves the new config.inc.php to the config/ directory, but if the webserver does not have the proper permissions you may see the error "Cannot load or save configuration." Ensure that the config/ directory exists and has the proper permissions - or use the Download link to save the config file locally and upload (via FTP or some similar means) to the proper location.

Also look for the errors / warnings that may show up at your screen. You can look at phpMyAdmin errors and solutions at phpMyAdmin Syntax Error And Solutions

Once the file has been saved, it must be moved out of the config/ directory and the permissions must be reset, again as a security measure. Now the file is ready to be used. You can choose to review or edit the file with your favorite editor, if you prefer to set some advanced options which the setup script does not provide.

Last but not least, you may want to look at phpMyAdmin Syntax Error And Solutions for any warnings / errors that you may find during using phpMyAdmin.

 << Install PHP   Install Zend Optimizer >> 


Article Source: Monx Digital Library

Copyrighted@ Monx Digital Library, otherwise stated
Use of our service is protected by our Terms of Use

 Back To Previous Page ...  




Jadi Jutawan Cuma Modal Nulis