Posts Tagged ‘roundcube error 500’

cPanel: RoundCube not working (Error 500)

Symptom: When you log into WebMail and select RoundCube, you will get an Error 500.

The first thing to try is to force an update for RoundCube by issuing the following command via SSH:

/usr/local/cpanel/bin/update-roundcube –force

If the reason for RoundCube not to work is its configuration files, this command will do the trick.
Now, if you get a MySQL Database error while updating it, it’s possible that your “roundcube” database is either corrupt, or you might have the InnoDB scheme disabled (RoundCube requires InnoDB).
In order to check if InnoDB is enabled on your server, simply issue the following command through SSH:

mysqladmin var |grep have_innodb

The command output should be similar to this:

| have_innodb                             | YES                                               |

If by any reason you get a “NO”, it means InnoDB is disabled, and you have to enable it to make RoundCube (and it’s update script) work.
The first thing to look out for is your MySQL master configuration file at /etc/my.cnf. Make sure you’re not using the “skip-innodb” command in it.

To make it easy, just run the following command:

grep skip-innodb /etc/my.cnf

If the skip-innodb command is found on the file, make sure you remove it.

NOTE: From this line on, I’m assuming you are NOT using the InnoDB schema for any of your databases. Please note that the procedure below may (most likely will) render any databases using the InnoDB schema corrupt. Do not proceed unless you’re 100% certain of what you’re doing.

If it’s not found, and you’re still having problems getting InnoDB to work, try the following batch of commands (just paste the full line in your command prompt and press Enter):

service mysql stop; cd /var/lib/mysql/; mv ibdata1 ibdata1.bak; mv ib_logfile0 ib_logfile0.bak; mv ib_logfile1 ib_logfile1.bak; service mysql start

The line above will stop the MySQL Server, change the working directory to “/var/lib/mysql/” where it then renames a few files and start the MySQL Server again. It’s important to shut it down before renaming any files.
Once the MySQL Daemon is started, the files will be generated again. Once the process is complete, check for InnoDB again using:

mysqladmin var |grep have_innodb

If it is showing as enabled, try to update RoundCube again:

/usr/local/cpanel/bin/update-roundcube –force

If you’re still getting a MySQL Database error after this, it’s most likely due to your RoundCube database being corrupted.
The solution on that case is to delete the database via phpMyAdmin (remove the database with the name “roundcube”), or you can also do it via SSH by logging into the MySQL Server (just type “mysql” in SSH) and issuing the following command:

drop database roundcube;

Now try to run the update script again (it should work this time):

/usr/local/cpanel/bin/update-roundcube –force