Author Topic: Error line 67 change password extension  (Read 20630 times)

Offline Pingponguin

  • Newbie
  • *
  • Posts: 4
Error line 67 change password extension
« on: March 10, 2015, 08:14:07 AM »
Hello,

when I start my roundcube installation I only see a white screen. The log says that this line is wrong, but I can't figure out what is wrong. I have chosen this configuration from the readme file of the extension:

$config['password_query'] = 'UPDATE users SET password=ENCRYPT(%p,concat(_utf8'$1$',right(md5(rand()),8),_utf8'$')) WHERE username=%u LIMIT 1';

Log: [10-Mar-2015 12:44:06 Europe/Berlin] PHP Parse error:  syntax error, unexpected T_STRING in /var/www/.../plugins/password/config.inc.php on line 67

I'm using version 1.1.0

Regards, Pingponguin

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Error line 67 change password extension
« Reply #1 on: March 10, 2015, 09:16:50 AM »
You have unescaped quotes, try the following:
Code: [Select]
$config['password_query'] = "UPDATE users SET password=ENCRYPT(%p,concat(_utf8'$1$',right(md5(rand()),8),_utf8'$')) WHERE username=%u LIMIT 1";

Offline Pingponguin

  • Newbie
  • *
  • Posts: 4
Re: Error line 67 change password extension
« Reply #2 on: March 10, 2015, 10:47:33 AM »
That didn't change anything. Could the code be wrong?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: Error line 67 change password extension
« Reply #3 on: March 11, 2015, 03:50:53 AM »
you should also check the pervious lines in the file for missing quotes or semi colons, just incase.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline Pingponguin

  • Newbie
  • *
  • Posts: 4
Re: Error line 67 change password extension
« Reply #4 on: March 11, 2015, 01:03:06 PM »
Hello,

I'm one step further and one back. Now I'm getting this error message:

Code: [Select]
[11-Mar-2015 17:49:36 +0100]: <rhrg5aed> DB Error: [1054] Unknown column 'password' in 'field list' (SQL Query: UPDATE users SET password=ENCRYPT('*****',concat(_utf8'$1$',right(md5(rand()),8),_utf8'$')) WHERE username='name@domain.tld' LIMIT 1) in /var/www/virtual/***/]mail.domain.tld/program/lib/Roundcube/rcube_db.php on line 541 (POST /?_task=settings&_action=plugin.password-save?_task=&_action=)
What does this mean?

Thanks and regards

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Error line 67 change password extension
« Reply #5 on: March 11, 2015, 01:25:25 PM »
The error is saying that there isn't a password field in the query. Did you customize the SQL query to fit your environment?

Offline Pingponguin

  • Newbie
  • *
  • Posts: 4
Re: Error line 67 change password extension
« Reply #6 on: March 11, 2015, 01:57:20 PM »
The error is saying that there isn't a password field in the query. Did you customize the SQL query to fit your environment?

I just put in the roundcube DB settings. Do I have to setup a table for the passwords or an extra DB and how do I have to call it?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Error line 67 change password extension
« Reply #7 on: March 11, 2015, 07:06:13 PM »
You need to connect to the database that stores your mail accounts (not the Roundcube DB) and write a query that will update the account password. The query is going to be different depending on how your environment is setup so I can't post what it would be.