If you install PlainCart and access the administration page, you are given a default username, which is “admin”, and a default password behind the asterisks. Hitting the login button should bring you directly to the PlainCart Administration page. But what if you encounter this error: “Wrong username or password”?
Was it a flaw in PlainCart? The answer is NOPE! It has something to do with your webhost.
You see, PlainCart uses the PASSWORD function to encrypt sensitive data in your MySQL database, especially passwords. But some webhosts were configured in such a way that they no longer recognizes the PASSWORD function of encryption. A work-around will be to change the encryption method from PASSWORD to MD5. Quite simple. Here’s what you need to do?
1. Open the file “admin/library/functions.php” and locate between lines 39-43 the word PASSWORD(’$password’). Change the word PASSWORD (not the variable name) to md5.
2. Edit the file “admin/user/changePass.php” and between lines 14-31, locate all of the instances of the word PASSWORD and change them all to md5. Be careful not to touch the $password variables.
3. Edit the file “admin/user/processUser.php” and locate between lines 50-58 the word PASSWORD and change them all to md5. On the same file, between lines 64-76, change all the instances of the word PASSWORD to md5.
4. You’re almost done. The next thing you have to do is to change the encrypted password in your database. Open the table tbl_user inside your PlainCart database (you may want to use PHPMyAdmin to do this task easier), click on the BROWSE tab, and edit the values for the record containing the username “admin”. In the user_password field, key-in your desired password for the “admin” username. Under the Function column, choose MD5 and save the data.
5. Head on to your PlainCart Administration page (yourdomain.com/plaincart/admin), key-in “admin” as the username and change the default password with the one you had just saved in the database table. It should make you access the Administration page of PlainCart.
If you got lost with my instructions above, please do not hesitate to email me via robert{dot}reyes{at}gmail{dot}com.
If you are helped by this tip, I will appreciate you sending me a US$2
Popularity: 25% [?]