Ok, but it’s still unclear. I can’t recognize the right place to install this script - as I suppose I need to run the shell and what else… to go to script directory? another place? maybe someone could show me the way step by step? I use CentOS also. If there are problems in CentOS, maybe should be better to change the system to Debian?
when change chmod 777 chgvirtualminpasswd, also get a some problems may I know got other thing need to change it? I install it by new function install script.
I got it working. It is a permssion problem.
If you are running PHP with FCGId mode, the domain owner user runs PHP, no apache.
So, I’ve change the user group on the installation script, the chown line, like this:
i’m stuck with the same problem here. i tried permission change to domain owner as suggested above, but no luck. strange thing is, that even when i rename the chgvirtualminpasswd file, the error message stays the same, so it seems that php is not even touching the file?
i’ve read some posts about exec rights and requiretty, but those settings are correct as well.
I looked into this a bit, and was able to get it working using the current RoundCube version (0.8.1), which is provided as a Virtual Install Script – but I had to make one tweak.
It appears that there is a PHP syntax error in this file:
roundcube/plugins/password/drivers/virtualmin.php
You’ll see these lines near line 54:
case 7: // domain_username
$pieces = explode("_", $username);
$domain = $pieces[0];
break;
case 8: // domain taken from alias, username left as it was
$email = $rcmail->user->data['alias'];
$domain = substr(strrchr($email, "@"), 1);
break
default: // username@domain
The problem is that second-to-last line, where it says “break”.
There needs to be a semi-colon after that line. It should read “break;”. Or, the entire code block would look like this:
case 7: // domain_username
$pieces = explode("_", $username);
$domain = $pieces[0];
break;
case 8: // domain taken from alias, username left as it was
$email = $rcmail->user->data['alias'];
$domain = substr(strrchr($email, "@"), 1);
break;
default: // username@domain
The only change I needed to make was just adding the ; character to that one line.
I was able solve this issue by changing the group in to apache. My setup is Nginx+php-FPM. The php-FPM is running as apache user. So I changed the ownership as chown root.apache chgvirtualminpasswd