Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-12-22 09:59:06

zoltandragon
Member
Registered: 2007-04-30
Posts: 47

Login failure - does not recognize password

Hi, I hope someone could guide me in this issue (help appreciated, really-really-truly). I have an old TXP site, running 4.2.0, php5.2 (I know…). I want to update to the latest release, but need to do some housekeeping first. However, I cannot enter the admin panel, as I get the following error (sensitive data reducted, of course, but I hope the error message is clear without it):

Warning: execute command denied to user 'db_user'@'localhost' for routine 'db_name.old_password' select name from txp_users where name = 'admin' and (pass = password(lower('thisisapassword')) or pass = password('thisisapassword') or pass = old_password(lower('thisisapassword')) or pass = old_password('thisisapassword')) and privs > 0 in /home/sitedirectory/public_html/textpattern/lib/txplib_db.php on line 85

Any help much appreciated, it would be crucial for me to enter the admin panel before proceeding with any new plan.
Thank you in advance :)

Offline

#2 2021-12-22 10:31:54

etc
Developer
Registered: 2010-11-11
Posts: 4,584
Website GitHub

Re: Login failure - does not recognize password

Hi, what is your MySQL version? OLD_PASSWORD support has been removed since MySQL 5.7.5.

Offline

#3 2021-12-22 10:51:10

zoltandragon
Member
Registered: 2007-04-30
Posts: 47

Re: Login failure - does not recognize password

etc wrote #332278:

Hi, what is your MySQL version? OLD_PASSWORD support has been removed since MySQL 5.7.5.

Hi, if I’m not mistaken, it is 5.7.36 (the web client is 5.6.43) (as you can see, I have no idea… :D sorry about that, I am far from being a developer).

Is there any workaround that solves this problem?

Thank you.

Offline

#4 2021-12-22 11:05:56

etc
Developer
Registered: 2010-11-11
Posts: 4,584
Website GitHub

Re: Login failure - does not recognize password

zoltandragon wrote #332280:

Is there any workaround that solves this problem?

There is always a workaround :-) But I’m not a pro dev, so take these with caution:

  • either tmp switch to pre 5.7.5 MySQL
  • or check/grant php user EXECUTE privileges
  • or edit txp_auth.php code

Offline

#5 2021-12-22 11:13:48

zoltandragon
Member
Registered: 2007-04-30
Posts: 47

Re: Login failure - does not recognize password

etc wrote #332281:

There is always a workaround :-) But I’m not a pro dev, so take these with caution:

  • either tmp switch to pre 5.7.5 MySQL
  • or check/grant php user EXECUTE privileges
  • or edit txp_auth.php code

oh, yeah, I did hope so :D The last option seems to be the most accessible – but what exactly would you suggest I edit in the code of the file?

Offline

#6 2021-12-22 11:53:58

etc
Developer
Registered: 2010-11-11
Posts: 4,584
Website GitHub

Re: Login failure - does not recognize password

zoltandragon wrote #332282:

what exactly would you suggest I edit in the code of the file?

You can try to replace

if (version_compare(mysql_get_server_info(), '4.1.0', '>='))

on line 44 of textpattern/include/txp_auth.php with if (false). At worst, you will not be able to login :-)

Offline

#7 2021-12-22 13:01:34

zoltandragon
Member
Registered: 2007-04-30
Posts: 47

Re: Login failure - does not recognize password

etc wrote #332283:

You can try to replace

if (version_compare(mysql_get_server_info(), '4.1.0', '>='))...

on line 44 of textpattern/include/txp_auth.php with if (false). At worst, you will not be able to login :-)

OMG, you’re a national treasure, it works like a charm! Thank you very much for your help :)

Offline

#8 2021-12-22 17:05:57

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,772
Website

Re: Login failure - does not recognize password

etc wrote #332281:

But I’m not a pro dev

You have ‘em fooled.

Offline

#9 2021-12-22 18:25:44

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,229
Website

Re: Login failure - does not recognize password

Destry wrote #332287:

You have ‘em fooled.

:-) Absolutely


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB