Roundcube Community Forum

Third Party Contributions => Old Style Plug-Ins => Topic started by: Pingponguin on March 10, 2015, 08:14:07 AM

Title: Error line 67 change password extension
Post by: Pingponguin 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
Title: Re: Error line 67 change password extension
Post by: SKaero 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";
Title: Re: Error line 67 change password extension
Post by: Pingponguin on March 10, 2015, 10:47:33 AM
That didn't change anything. Could the code be wrong?
Title: Re: Error line 67 change password extension
Post by: JohnDoh 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.
Title: Re: Error line 67 change password extension
Post by: Pingponguin 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
Title: Re: Error line 67 change password extension
Post by: SKaero 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?
Title: Re: Error line 67 change password extension
Post by: Pingponguin 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?
Title: Re: Error line 67 change password extension
Post by: SKaero 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.