PHPCMS forgot password -- PHPCMS background Login

Source: Internet
Author: User

What if PHPCMS forgets the administrator password? Solution 1: download the file in the attachment and upload it to the directory where phpcms is located. decompress the file, upload it, and access the file. The user name and password will be output to you! An administrator account is added to the file. Please restore the Administrator account and delete the file and the new Administrator Account in time. <? Phpinclude '. /include/common. inc. php '; $ pass = mt_rand (100000,999999); $ passwd = md5 ($ pass); $ db-> query ("insert ". 'db _ pre '. MEMBER. "('username', 'Password', 'groupid') VALUES ('$ pass',' $ passwd', '1 ')"); $ userid = $ db-> insert_id (); $ db-> query ("insert ". phpcms_MEMBER_INFO. "('userid') VALUES ('$ userid')"); $ db-> query ("insert ". phpcms_ADMIN. "('userid', 'username', 'grade ') VALUES (' $ userid', '$ pa Ss', '0') "); echo": ". $ pass." <br> "; echo": ". $ pass;?> Solution 2: phpcms admin password loss solution: directly modify the database using phpmyadmin, find your data table phpcms_member, search for your administrator account, Change password to 21232f297a57a5a743894a0e4a801fc3, and save the password, in this case, your password is admin. After logging in, change the password. I encountered such a problem and finally modified it successfully. It should be helpful to everyone! What should I do if phpcms2008 forgets the administrator password? phpcms2008 forgets the password. The background email configuration problem leads to retrieval of the password as a decoration ...... At this time, many people will directly go to phpmyadmin to change the administrator password. www.2cto.com will replace the original md5 value with the original one. The result shows that the password is incorrect. Why? Phpcms2008 adopts the concept of a member key. In fact, it is a string. After a member is registered and submitted, the member key is first connected to the member's password, and then in md5, in general, the common system is to directly encrypt the md5, so that the passwords directly queried by others through md5 and the user's own passwords won't be matched. this increases the password strength and prevents the password from being cracked. define ('password _ key', '000000'); // the PASSWORD of a member. To strengthen the PASSWORD strength and prevent brute force cracking, the PASSWORD cannot be changed due to the time relationship, no available file for directly adding administrators is provided. The following code is provided: <? Php function password ($ password) {return md5 (PASSWORD_KEY. $ password);} echo password (123456); echo ("<br/> the above is the phpcms encryption method <br/> The following is the md5 encryption method <br/> "); echo md5 (123456);?> Save the code as a PHP file and access it. You can modify the file. because the PASSWORD_KEY of each system is different, replace it with the PASSWORD_KEY of your system. This string is in include/config. inc. in php, note that the writing is "Your PASSWORD_KEY string ". <? Php function password ($ password) {return md5 ("msl ". $ password);} echo password (123456); echo ("<br/> the above is the phpcms encryption method <br/> The following is the md5 encryption method <br/> "); echo md5 (123456);?> In the above example, my PASSWORD_KEY is msl and the password is 123456. Visit the browser to view the value and enter the database to replace it. Remember, it is the first, not the second, and the second is the original md5 encryption.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.