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.
Related Articles
- How to Calculate and Generate MD5 Hash Value in Linux and Unix with md5sum
- Install XCache PHP Accelerator in Linux by Compiling from Source
- Run WordPress at Top Fast Speed by Putting Objects and Variables into XCache or eAccelerator Cache Memory (Plugin)
- Hash Calculator to Get, Compute and Calculate MD5 and SHA1 File Checksum or Hash Value
- Keep Your Password Safely With MyPadlock Password Manager
- Remove The Automatic Appearance of Your Password In The Password Box
- Trick to Enable and Allow Windows XP and Vista Remote Desktop Login Without Password (or With Blank Null Password)
- Forgot Windows Administrator Password? Ways to Recover and Reset Password in Vista/XP/2003/2K/NT
- Check File Integrity By Comparing Hash Value with FileVerifier
- Apple iPhone Root Password and Mobile User Password










































December 10th, 2008 02:26
[...] 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 [...]
April 24th, 2008 10:24
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?
April 22nd, 2008 19:54
The correct script is
Without “” in ().