Roundcube Community Forum

 

Recent posts

#21
General Discussion / Re: How to solve 'PHP Error: P...
Last post by simonleung - November 18, 2025, 03:34:50 AM
Quote from: SKaero on November 18, 2025, 01:59:45 AMI don't see anything there that should be causing an issue. In the plugins/password/password.php file can you change "Password plugin: Hash method not supported." to "Password plugin: Hash method (". $method .") not supported." and then post the error so we can see what method its trying to use?

Quote from: SKaero on November 18, 2025, 01:59:45 AMI don't see anything there that should be causing an issue. In the plugins/password/password.php file can you change "Password plugin: Hash method not supported." to "Password plugin: Hash method (". $method .") not supported." and then post the error so we can see what method its trying to use?


Thanks for your help. It was my wrong and I have solved that problem. Still, I found another problem in the log file(see https://www.roundcubeforum.net/index.php?topic=31768.0). Could you help me check it?
#22
General Discussion / PHP Error: Bind failed: Invali...
Last post by simonleung - November 18, 2025, 03:31:13 AM
I find the error message in the log file of Roundcube as follows. What is about? How do I solve it?


[18-Nov-2025 16:30:04 Asia/Hong_Kong] PHP Deprecated:  Return type of Net_LDAP2_Search::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/roundcube/vendor/pear/net_ldap2/Net/LDAP2/Search.php on line 565
[18-Nov-2025 16:30:04 Asia/Hong_Kong] PHP Deprecated:  Return type of Net_LDAP2_Search::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/roundcube/vendor/pear/net_ldap2/Net/LDAP2/Search.php on line 596
[18-Nov-2025 16:30:04 Asia/Hong_Kong] PHP Deprecated:  Return type of Net_LDAP2_Search::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/roundcube/vendor/pear/net_ldap2/Net/LDAP2/Search.php on line 581
[18-Nov-2025 16:30:04 Asia/Hong_Kong] PHP Deprecated:  Return type of Net_LDAP2_Search::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/roundcube/vendor/pear/net_ldap2/Net/LDAP2/Search.php on line 619
[18-Nov-2025 16:30:04 Asia/Hong_Kong] PHP Deprecated:  Return type of Net_LDAP2_Search::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/roundcube/vendor/pear/net_ldap2/Net/LDAP2/Search.php on line 632
[18-Nov-2025 16:30:04 +0800]: <ro5hei66> PHP Error: Bind failed: Invalid credentials: LDAP_INVALID_CREDENTIALS (POST /?_task=settings&_action=plugin.password-save)
[18-Nov-2025 16:30:04 Asia/Hong_Kong] PHP Fatal error:  Uncaught TypeError: ldap_close(): Argument #1 ($ldap) must be of type LDAP\Connection, false given in /var/www/roundcube/vendor/pear/net_ldap2/Net/LDAP2.php:701
Stack trace:
#0 /var/www/roundcube/vendor/pear/net_ldap2/Net/LDAP2.php(701): ldap_close()
#1 /var/www/roundcube/vendor/pear/pear-core-minimal/src/PEAR.php(814): Net_LDAP2->_Net_LDAP2()
#2 [internal function]: _PEAR_call_destructors()
#3 {main}
  thrown in /var/www/roundcube/vendor/pear/net_ldap2/Net/LDAP2.php on line 701


#23
General Discussion / Re: How to solve 'PHP Error: P...
Last post by SKaero - November 18, 2025, 01:59:45 AM
I don't see anything there that should be causing an issue. In the plugins/password/password.php file can you change "Password plugin: Hash method not supported." to "Password plugin: Hash method (". $method .") not supported." and then post the error so we can see what method its trying to use?
#24
Pending Issues / Re: Login from external site/f...
Last post by ballouhosting - November 18, 2025, 01:42:50 AM
Would you know if I need to change anything beside my script and the autologin plugin?
Feels strange if I need to change anything in the "index.php".
#25
General Discussion / Re: How to solve 'PHP Error: P...
Last post by simonleung - November 17, 2025, 11:00:11 PM
Quote from: SKaero on November 17, 2025, 09:36:38 AMCan you post how you have the password plugin configured?

The configuration of config.inc.php is as follows and could you help me check it?


$config['password_driver'] = 'ldap';

$config['password_confirm_current'] = true;

$config['password_log'] = true;

$config['password_algorithm'] = 'ssha512';

$config['password_ldap_host'] = 'testdomain.com';

$config['password_ldap_port'] = '389';

$config['password_ldap_starttls'] = false;

$config['password_ldap_version'] = '3';

$config['password_ldap_basedn'] = 'dc=testdomain,dc=com';

$config['password_ldap_method'] = 'user';

$config['password_ldap_adminDN'] = null;

$config['password_ldap_adminPW'] = null;

$config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=testdomain,dc=com';

$config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=testdomain,dc=com';

$config['password_ldap_searchPW'] = 'secret';

$config['password_ldap_search_base'] = 'ou=people,dc=testdomain,dc=com';

$config['password_ldap_search_filter'] = '(uid=%login)';

$config['password_ldap_encodage'] = 'md5-crypt';

$config['password_ldap_pwattr'] = 'userPassword';

$config['password_ldap_force_replace'] = true;

$config['password_ldap_lchattr'] = '';

$config['password_ldap_ppolicy_cmd'] = 'change_ldap_pass.pl';

$config['password_ldap_ppolicy_uri'] = 'ldap://testdomain.com/';;

$config['password_ldap_ppolicy_basedn'] = 'dc=testdomin,dc=com';

$config['password_ldap_ppolicy_searchDN'] = 'cn=someuser,dc=testdomain,dc=com';

$config['password_ldap_ppolicy_searchPW'] = 'secret';

$config['password_ldap_ppolicy_search_filter'] = '(uid=%login)';

$config['password_ldap_ppolicy_cafile'] = '/etc/ssl/cacert.crt';

#26
Pending Issues / Re: Login from external site/f...
Last post by SKaero - November 17, 2025, 01:00:12 PM
I don't have any examples to point to other than the autologin plugin that ships with Roundcube. If you have a modified plugin that isn't working if you post that and the problem I could try to help debug the issue.
#27
Pending Issues / Re: Bad Gateway - Ubuntu 22.04
Last post by SKaero - November 17, 2025, 12:57:11 PM
Is there anymore details in the nginx or php-fpm error logs, hard to point to anything without more information on why its failing.
#28
Pending Issues / Re: Login from external site/f...
Last post by ballouhosting - November 17, 2025, 12:30:07 PM
Thank you. I had one before but that one isn't working now.
I posted the user info to a file on the roundcube and from there it logged in.
Do you have help info or links?
#29
Pending Issues / Re: Bad Gateway - Ubuntu 22.04
Last post by CairoBlues - November 17, 2025, 10:05:02 AM
PS: All mailboxes are functioning normally, SSL is configured properly, etc.. There are no mail issues.
#30
Pending Issues / Bad Gateway - Ubuntu 22.04
Last post by CairoBlues - November 17, 2025, 10:01:04 AM
Hi, folks.
Hoping someone can help me figure this one out.

One of our mail servers has an issue with RC webmail, following disaster recovery. There was never a problem with the webmail service before DR and nothing has been changed on the server since the previous DR backup was made, so there's no logical reason for things not to work, now.

The server is nginx and the configs I believe to be relevant are here:

/etc/nginx/sites-enabled/mail.domain.com.conf

server {
  server_name _;
  location ~ \.php$ {
  include snippets/fastcgi-php.conf;

  fastcgi_split_path_info ^(.+\.php)(/.+)$;
  fastcgi_pass unix:/run/php-fpm/php7.4-fpm.sock;
  include fastcgi_params;
}

default_type text/html;

include /etc/nginx/templates/iredadmin.tmpl;    # <- iRedAdmin
include /etc/nginx/templates/roundcube.tmpl;    # <- Roundcube webmail

 # certbot stuff...
}

/etc/nginx/sites-enabled/00-default-ssl.conf

server {
 listen 443 ssl http2;
 listen [::]:443 ssl http2;

 server_name _;
 index index.php;

 include /etc/nginx/templates/misc.tmpl;
 include /etc/nginx/templates/ssl.tmpl;
 include /etc/nginx/templates/iredadmin.tmpl;
 include /etc/nginx/templates/roundcube.tmpl;
 include /etc/nginx/templates/sogo.tmpl;
 include /etc/nginx/templates/netdata.tmpl;
 include /etc/nginx/templates/php-catchall.tmpl;
 include /etc/nginx/templates/stub_status.tmpl;
}

/etc/nginx/templates/roundcube.tmpl

location ~ ^/mail/(bin|config|installer|logs|SQL|temp|vendor)($|/.*) { deny all; }
location ~ ^/mail/(CHANGELOG|composer.json|INSTALL|jsdeps.json|LICENSE|README|UPGRADING)($|.*) { deny all; }
location ~ ^/mail/plugins/.*/config.inc.php.* { deny all; }
location ~ ^/mail/plugins/enigma/home($|/.*) { deny all; }

location = /mail {
 return 301 /mail/;
}

location ~ ^/mail/(.*\.php)$ {
 include /etc/nginx/templates/hsts.tmpl;
 include /etc/nginx/templates/fastcgi_php.tmpl;
 fastcgi_param SCRIPT_FILENAME /opt/www/roundcubemail/$1;
}

location ~ ^/mail/(.*) {
 alias /opt/www/roundcubemail/$1;
 index index.php;
}

Php7.4-fpm is running and the path to it is correct in the sites-enabled config files. Permissions are 660 on /var/run/php/php7.4-fpm.sock.

When I visit domain.com/iredadmin, I can sign in and everything works.
When I visit domain.com/mail, I get 502 Bad Gateway.

If there's any further information I can provide, please let me know.
Thank you!