Roundcube hanging or 500 error
Roundcube can hang and return a 500 error for a variety of reasons, but the most common one in cPanel is when the email account’s domain points to another server or Cloudflare. cPanel sets the user calendar to yourdomain.com:2080 and can be fixed by doing the following replacing username with the cPanel username and yourdomain.com with the domain and emailaccount with the email account:
sqlite3 /home/username/etc/yourdomain.com/emailaccount.rcube.dbYou can confirm carddav is set wrong by running the following:
select id,discovery_url from carddav_accounts;If it shows yourdomain.com:2080 and yourdomain.com does not point to this server, then you need to update. The output may look similar to this upon running the query:
1|https://yourdomain.com:2080/addressbooks/__uids__/H3B3D0C4-DB2E-9492-9D7C-C9B8ADFF578C/Update the address to be one that resolves to the server which in our case is mail.yourdomain.com:
update carddav_accounts set discovery_url='https://mail.yourdomain.com:2080/addressbooks/__uids__/H3B3D0C4-DB2E-9492-9D7C-C9B8ADFF578C/' where id =1;You will also need to fix the carddav_addressbooks table so first you’ll need to retrieve the current values:
select id,discovery_url from carddav_addressbooks;The output may look similar to this upon running the query:
1|https://yourdomain.com:2080/addressbooks/emailaddress@yourdomain.com/addressbook/Update the address to be one that resolves to the server which in our case is mail.yourdomain.com:
update carddav_addressbooks set discovery_url='https://mail.yourdomain.com:2080/addressbooks/emailaddress@yourdomain.com/addressbook/' where id =1;Once that is completed you can exit the sqlite3 session with:
.exitUpone completion you should be able to access Roundcube without any issues.