Will check thanks!

On Tue, Mar 7, 2017 at 1:50 PM, Matt Graham <mhgraham@crow202.org> wrote:
On 2017-03-06 20:38, Herminio Hernandez, Jr. wrote:
Here is the string I am using 'UPDATE virtual_users SET
password=ENCRYPT(%p,concat('$6$',substring(sha(rand()),-16))), WHERE
email=%u LIMIT 1';

However, now roundcube is crashing and I am seeing this error
Parse error:  syntax error, unexpected '$' in
/var/www/roundcube/roundcubemail-1.2.1/plugins/password/config.inc.php

Not sure what I am missing....

config.inc.php is a PHP file, and variables in PHP have a $ in front of them.  I would guess that you have a line sort of like

$rcmail_config['password_update_query']="UPDATE virtual_users SET password= ENCRYPT(%p,concat('$6$', substring(sha(rand()),-16))), WHERE email=%u LIMIT 1";

...which is syntactically invalid because $6 is not a valid variable name.  The $ chars in the SQL need to be escaped with \ .  Try replacing '$6$' with '\$6\$' .


--
Crow202 Blog: http://crow202.org/wordpress
There is no Darkness in Eternity
But only Light too dim for us to see.
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss