Proper Way to Generate MD5 Hash for XCache Administration Password with md5sum or PHP

XCache is a PHP opcode cacher, more commonly known as PHP accelerator that speeds up PHP-based web pages serving and reduces web server load. XCache comes with a web-based administration page (admin-page) user interface that allows administrators or webmasters to monitor and operate the PHP opcode cache in the memory with the performance statistics. To use this admin-page, an user ID and password have to be defined in PHP.INI configuration file under xcache.admin.user and xcache.admin.pass parameter to authenticate the http-auth process.

For security purpose, password value entered in xcache.admin.pass has to be the MD5 hash. When user go to XCache admin-page, the http-auth will prompt to ask for user name and password credential. If the MD5 hash value for the password that user wants to use and assumed to be correct, is in fact a wrong one, then user will unable to login to the admin-page.

To generate the MD5 hashes for your desired password for XCache admin-page in PHP.INI, there are plenty of methods. The following two ways are some of the simplest way to get the password’s MD5 value without compromising security by transmitting password across network or Internet in plain text.

PHP Script

Create a new PHP script page on the webserver, and place the file within a website or virtual directory accessible from Internet:

<?php
echo md5(“password”);
?>

After saving the file with any name, request it from web browser using your domain name and get the MD5 hash value for your password, and update PHP.INI with the value.

md5sum

md5sum is a computer program which calculates and verifies MD5 hashes, and is installed by default in most Unix, Linux, and Unix-like operating systems or compatibility layers, including CentOS, the popular operating system for web hosts.

To generate MD5 hash value for the password using md5sum, the correct syntax is as follow:

echo -n “password” | md5sum

SSH to the server and run above command, the enter the value generate into PHP.INI.

In both cases, restart Apache web server after editing PHP.INI to make the changes effective.

3 Responses to “Proper Way to Generate MD5 Hash for XCache Administration Password with md5sum or PHP”

  1. How to Calculate and Generate MD5 Hash Value in Linux and Unix with md5sum » My Digital Life
    December 10th, 2008 02:26
    3

    [...] servers powered by cPanel or Plesk, where administrators or webmasters have to commonly generate MD5 hash for the password used in PHP scripts or other web [...]

  2. michosn
    April 24th, 2008 10:24
    2

    i found many sites that give md5 coding and decoding like
    http://www.joomlaaa.com/md5-coding-decoding
    i do not know how they can decode md5
    anyone know a script to decode md5?

  3. vlader
    April 22nd, 2008 19:54
    1

    The correct script is

    Without “” in ().

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.

New Articles

Incoming Search Terms for the Article

generate md5 password - VLADER 2.0 - linux md5 password - md5 password linux - linux password md5 - linux plain text to MD5 hash - linux generate md5 - generate md5sums for package linux - linux generate md5 hash - generate md5 linux - md5sum password - md5 password in linux - speed up Mamp apc eAccelerator XCache - linux use md5 passwords - generate md5sum of password - generating md5 hash in linux - generar pass md5 linux - linux generate md5sum in script - md5 encrypt password linux - create md5 password - create password md5 hash - password echo md5sum - add hash linux md5 - how to generate MD5 password on linux - eaccelerator decode etmek - linux md5 passwort - md5sum password linux - useradd password md5sum - php + md5sum - create md5 hash password - how to generate an md5 password - md5 hash linux - make password hash in linux - create md5 hash linux - md5 hash create linux - hash md5 linux - linux create md5-hash - create hash md5 password - how to generate md5sum password - how to generate md5 password - linux md5 hash shadow - passwords linux md5 - md5 hash source linux passwd - XCache Administration Page - linux generate md5 - linux md5 passwords - linux md5 hash - create a md5 hash in linux - generate md5 hash linux - generate linux password hash -