Archive for the ‘System Administration’ Category

Samsung Galaxy S8: Wi-Fi keeps disconnecting

After having started to use my Samsung Galaxy S8 (SM-G950F), I have noticed that the Wireless Connection kept getting reconnected at totally random intervals.

This started to happen after the device got updated to the latest firmware (G950FXXU1AQDG), which seems to have introduced the bug into the system.

After trying pretty much everything I could think of (like rebooting the phone, router, etc) I have tried to disable “Nearby device scanning” (the function that scans for nearby Bluetooth LE devices) and this seems to have fixed it.

To disable “Nearby device scanning” and avoid having your wi-fi connection restarted all the time, open your Samsung Galaxy S8’s menu and find the “Settings” icon. From there, click on “Connections”, followed by “More connection settings”. The “Nearby device scanning” option will be the very first on the list and it’s enabled by default.

Disabling it seems to fix the issue.

I am not sure why this happens as I haven’t “rooted” my phone (I just do not have that habit) so I can only presume that, somehow every time it tries to search for a Bluetooth LE (Low Energy) devices, the module controlling the connections (which is the same for Bluetooth and Wi-Fi) halts/fails and the connection is lost. The issue is temporarily resolved by disabling/reactivating Wi-Fi until the same thing happens all over again.

If you’re watching a movie or listening to music, this can be extremely annoying, so hopefully this post will help you out and prevent a trip to the store or a call to Samsung ūüôā

Note: Disabling “Nearby device scanning” will inevitably have some side-effects. If you use a Bluetooth LE device, such as a Fitness Tracker or SmartWatch, you may lose some functionality when you disable this.

Considering that this issue only started to occur on the latest firmware build, it’s most likely going to be fixed by Samsung soon. So… if you get a notification of a Software Update, make sure you go for it and re-activate the “Nearby device scanning” for at least an hour to test it out and confirm that it’s been fixed.


VMware Workstation Pro 12 on Fedora 23

While the installation process will succeed without any error, you aren’t able to start VMware Workstation Pro neither VMware Workstation Player.
When trying to launch either application through the command line, you obtain the following errors:

(vmware-modconfig:7066): Gtk-WARNING **: Unable to locate theme engine in module_path: “adwaita”,

(vmware-modconfig:7066): Gtk-WARNING **: Unable to locate theme engine in module_path: “adwaita”,
/usr/share/themes/Adwaita/gtk-2.0/gtkrc:1163: error: unexpected identifier `direction’, expected character `}’
Gtk-Message: Failed to load module “pk-gtk-module”: cannot open shared object file: No such file or directory
Gtk-Message: Failed to load module “canberra-gtk-module”: cannot open shared object file: No such file or directory
/usr/share/themes/Adwaita/gtk-2.0/gtkrc:1163: error: unexpected identifier `direction’, expected character `}’

(vmware-tray:7098): Gtk-WARNING **: Unable to locate theme engine in module_path: “adwaita”,

(vmware-tray:7098): Gtk-WARNING **: Unable to locate theme engine in module_path: “adwaita”,
/usr/share/themes/Adwaita/gtk-2.0/gtkrc:1163: error: unexpected identifier `direction’, expected character `}’
Gtk-Message: Failed to load module “pk-gtk-module”: cannot open shared object file: No such file or directory
Gtk-Message: Failed to load module “canberra-gtk-module”: cannot open shared object file: No such file or directory

Fixing this is easy, just use the following one-line commands (as root):

  1. Removing the problematic libraries bundled with VMware Workstation Pro 12

    for lib2rm in libgio libglib libgmodule libgobject libgthread; do rm -f /usr/lib/vmware/lib/${lib2rm}${lib2rm}; ln -s /usr/lib64/${lib2rm} /usr/lib/vmware/lib/${lib2rm}${lib2rm}; done

  2. Creating a script to launch vmware & vmplayer properly:

    for vmapp in vmplayer vmware; do mv /usr/bin/$vmapp /usr/bin/$vmapp.bin; echo -e \#\!\/bin\/bash > /usr/bin/$vmapp; echo -e “export VMWARE_USE_SHIPPED_LIBS=force\n/usr/bin/${vmapp}.bin \$*” >> /usr/bin/$vmapp; chmod +x /usr/bin/$vmapp; done

You should now be able to launch VMware Workstation Pro (or the Workstation Player) in a normal manner.

That’s it for VMware Workstation Pro 12, VMware Workstation Pro Player & Fedora 23.

VirtualBox: Guest OSes not booting (black screen) after updating the host machine

On 90% of the cases, this is due to a bad (either corrupt or mismatched) expansion pack (both on Linux and Windows).
Follow the steps below to reload the expansion pack:

Start VirtualBox and click on File and then on Preferences, as shown on the image below:

How to reach the preferences menu in VirtualBox in order to uninstall the expansion pack.

How to reach the preferences menu in VirtualBox in order to uninstall the expansion pack.

Navigate to “Extensions” and select/highlight “Oracle VM VirtualBox Extension Pack X” where X represents the version of the pack (irrelevant for now).

VirtualBox extensions page within the preferences menu.

VirtualBox extensions page within the preferences menu.

Then click on the REMOVE button and confirm your action when asked to:

VirtualBox Removal Confirmation Dialog

VirtualBox Removal Confirmation Dialog

If you’re using Linux, it’s certain that you’ll need to authenticate as root in order to proceed (absolutely no harm in this):

VirtualBox (Linux) - Authentication

VirtualBox (Linux) – Authentication

Once you’ve successfully removed the Extension Pack, simply reinstall it again by downloading the latest version of it through the official website.
Extension packs are usually delivered on the “vbox-extpack” format, which allows you to install them by simply executing them on a system where VirtualBox is installed (that would obviously be the HOST machine).

If that fails to work, you can alternatively download the extension pack (Right-Click, Save As) and installing it manually through the Preferences menu (pretty much the same procedure, but in lieu of removing it, you’ll be installing it).

Fedora Core: Installing Viber on your Fedora-based system

As many of you probably know, Viber has recently launched its official version for Linux systems.
Unfortunately it was released with a few limitations — not only there’s no 32-bit version (so forget about it for now if you’re on an i386 arch), but it was also developed for Ubuntu and its derivatives, such as Linux Mint, Zorin and other popular ones.

With that said, if you’re using one of the supported distros, there’s not much to it, just download the .deb and install it.
(click here for a full list of the distros where you should be able to install Viber without any tweaks)

If you’re using something else (like me — Fedora 20), a few commands will be necessary to make it work.
To install it on your Fedora (or Fedora-Derivative system), just run the following one-liner as root:

yum -y install icu libfdt libicu qt5-qtbase qt5-qtsvg qt5-gstreamer; mkdir /tmp/viberinstall; cd /tmp/viberinstall; wget; ar -x viber.deb data.tar.gz; tar -xzf data.tar.gz; /usr/bin/cp -f ./usr/share/applications/viber.desktop /usr/share/applications/viber.desktop; /usr/bin/cp -f ./usr/share/pixmaps/viber.png /usr/share/pixmaps/viber.png; /usr/bin/cp -fR ./usr/share/viber /usr/share/viber; rm -f /usr/bin/viber; echo > /usr/bin/viber; echo -e ‘#!/bin/sh\nexport VIBER_HOME=”/usr/share/viber”\n\$VIBER_HOME/Viber –resources=$VIBER_HOME \$*’ > /usr/bin/viber; chmod 755 /usr/bin/viber; chmod 777 /usr/share/viber; cd /usr/share/viber; rm -fR /tmp/viberinstall

To run Viber, just type “viber” on a console (as your username, not as root of course).
Or, just look for it under “Applications” –> “Internet” from your application launcher as it should be there as well.

Oh, and before you ask — It will be installed to /usr/share/viber because that’s where it gets installed on Ubuntu derivatives by default. If you prefer to have it installed somewhere else, just modify the one-liner paths accordingly and edit your /usr/bin/viber file to make sure it points to the correct binary’s location.

Remember: This will only work on 64-bit systems!

Adobe CS5: Payload cannot be installed due to dependent operation failure

I just got this error while trying to install a few applications from the Adobe CS5 suite on a relative’s system today.

The installation would basically stop, and the following would show up in the installation logs:

WARNING: Payload cannot be installed due to dependent operation failure

After some research with no productive results I had to investigate this myself and after about 30 minutes I was able to pinpoint the cause by mere chance (or should I say, experience?); mostly due to past problems with Adobe products (Adobe Reader), as even though the error wasn’t the same — the solution was.

I tend to customize every OS I install, not only to suit my needs but also to calm down my data-loss and “what if he/she breaks the system afterwards” paranoia, so one of the very first things I do on my friends/relatives’ systems is to modify their “user folders”, mainly to ensure they won’t lose any data if they ever break Windows to a point where a fresh install is required.

Usually I create a partition within the same physical disk, assign a drive letter (usually D) and label (Data).
Most Windows users aren’t that technical, and despite having such partition available, they will still save everything under “My Documents”, so I had to figure out a way to force them to save the data into the designated folders. The solution was to map their folders to the D drive, so when they save their data to “My Documents” or any other user folder, they’re actually saving the data to the secondary partition that I have just created.

Everything usually works fine but for some reason that I cannot understand (I can but I cannot believe Adobe didn’t think about this), most of the Adobe products I install have a problem with this setup (even though Windows allows you to do this by default, it’s a feature).

The solution is quite simple, you either have to recreate the user folders in their default location (C:\Users\USERNAME), or to simply temporarily undo your home folder path customization, installing your Adobe applications and then redo your customization all over again.

If you opt for the first option, here is the list of folders that you’ll have to create/recreate in order to prevent Adobe’s setup from failing (due to a non-existing path):

  • C:\Users\USERNAME\Contacts
  • C:\Users\USERNAME\Documents
  • C:\Users\USERNAME\Music
  • C:\Users\USERNAME\Pictures
  • C:\Users\USERNAME\Videos

As for the rest of the user folders (Favourites, Saved Games, etc), they aren’t needed as the Adobe Setup won’ t try to access them.
Needless to say, replace USERNAME with your actual username. Then, reboot your system.

That should be it. Once those paths are accessible, the setup should complete without any problem.
If for any reason you’re still getting the same error after this, that probably means the issue isn’t the same so you’ll have to keep investigating it.

If¬† that’s your case, I strongly recommend you to try Adobe’ s Cleaner Tool¬† (especially when nothing else works):

Good Luck!

Windows 7: An error occurred while checking for new updates for your computer (Code 8024800A)

I have recently I have made Linux the primary OS on all my computers.
However, mostly due to Adobe Flash/Photoshop and other few important applications, I decided to leave Windows on a separate disk on each of the computers. (I’ve basically installed Linux into 2 new disks and left the existing Windows drives untouched, as secondary boot devices.)

So, today I needed to use Photoshop and therefore had to boot Windows 7.
Naturally, after not using it for at least 3 months, the first application I have opened was “Windows Update”.

To my surprise, I got an error while checking for them (code 8024800A) on both of my computers and from what I have read – this can happen if you do not check for updates for a while (EG: if you don’t use your computer for an extended period of time).
This may sound silly at first but it makes sense to me as I have just seen this on 2 separate machines.

This is what I’ve done to get it working again:

  1. Click on your “Start” button, then go to “All Programs” -> “Accessories”.¬† You should see an icon for “Command Prompt”. Right-click it, and click on “Run as administrator”.
  2. Type each of the following commands, one by one; followed by the “Enter” or “Return” (really, that old?) key.
    net stop wuauserv & net stop cryptSvc & net stop bits
    net stop msiserver & mkdir C:\8024800A\
    move C:\Windows\SoftwareDistribution C:\8024800A\
    move C:\Windows\System32\catroot2 C:\8024800A\
    net start wuauserv & net start cryptSvc
    net start bits & net start msiserver

    Command Line Prompt output.

    Command Line Prompt output.

  3. Open a “Windows Update” window (like you would normally do to update your computer) and click on “Check for Updates”.¬† Wait for the process to finish.

You should now be able to update again.

NOTE: The process above will create a backup of the current files being used by your system at “C:\8024800A”.
It’s safe and encouraged to delete this folder once you confirm that Windows Update is working correctly.

Sony Xperia U (ST25i): Performance issues after updating to Android ICS (4.0.4) using the official method

I have noticed my household’s Xperia U (ST25i) slowed down quite a lot after upgrading to ICS (6.1.1.B.1.54-Stock Version), using the official method provided by Sony.

I do not want to have the phone rooted at the moment, so wanted to ensure I would find a solution without requiring such thing. And I just did.

Here’s how to bring your Xperia U up to speed again:

WARNING: I am not responsible for any problems that may occur after you follow the instructions below. Do not proceed unless you’re absolutely sure that you know what you’re doing. Proceed at your own risk. You have been warned.

    1. First and foremost, check your android version and build number (go to “Settings” -> “About Phone”). They must be “4.0.4” and “6.1.1.B.1.54”, as that is the package being distributed by Sony in Europe, at least at the moment. So if you have upgraded your phone to ICS through the official method, those versions should match.
    2. Download Flashtool, it’s available here.
    3. Download the World-Unlocked Kernel Firmware File, it’s available here.
    4. Install FlashTools (install to C:\Flashtool).
    5. Install the Flashtool drivers. To do this, execute the file”Flashtool-drivers.exe”, which should be located at “C:\Flashtool\drivers” in your computer.
      Under “Components to install”, check the following items:

      • Xperia P, Xperia U and Xperia sola drivers
      • Flashmode drivers
      • Fastboot drivers

      Click the “Install” button and let it run. The installer will execute “dpinst32.exe” (Windows Driver Package Installer) on the final stage. Make sure you complete the process there, and do not freak out once you see the “Untrusted/Unsigned” driver installation warning – make sure you allow it, as you do need the drivers for the process to work, and they’re harmless anyway. Once you complete the installation of the drivers on the “Driver Package Installer” window, the Flashtool driver’s setup will resume and tell you that the installation process is complete.

    6. Extract the file “xperia u_6.1.1.B.1.54_World kernel.ftf” from the archive you downloaded ( to the folder “C:\Flashtool\firmwares”.
    7. Enable “USB Debugging” on your phone by going to “Settings -> “Developer Options”. It should be the very first option of that screen. Once “USB Debugging” is enabled, you should see a new icon on your phone’s task bar (the top one), reminding you of that fact.
    8. Connect your Xperia U to the computer and give it time to install its drivers (Windows should notify you during the process or show an icon in your taskbar)
    9. Start Flashtool as an administrator (just to make sure). You can do this through the start menu or by browsing the “C:\Flashtool” folder, then right-clicking “FlashTool.exe” (or just “FlashTool” if your Windows is not setup to show file extensions) and selecting “Run as Administrator”.
    10. Click on the very first button in the Flashtool interface (“Flash”) and then select “Flashmode” on the mode selector.
    11. You should now have the “Firmware Selection” window in front of you. Unless you did not copy the firmware file to the “firmwares” folder, you should see it listed under “Select a Firmware”. The version you need to select is “6.1.1.B.1.54“. Once the version is selected, click on “OK” button.
    12. Flashtool will now shutdown your phone and ask you to connect it in “Flash Mode”. To do so, just press and hold the “Volume -” key, and while holding it, press the power button. Flashtool will recognize that the phone is in flash mode, and will carry on with the rest of the process.
    13. Flashtool will now show the message “Please unplug and start your phone”. This means exactly that, disconnect the phone from your computer, and power it on. Your phone’s performance should now be back to what you were used to, while still running Android 4.0.4 (ICS)!

The Flashtool log should look like this (or similar):

07/038/2013 18:38:42 - INFO  - Device connected with USB debugging on
07/038/2013 18:38:45 - INFO  - Connected device : ST25
07/038/2013 18:38:45 - INFO  - Installed version of busybox : N/A
07/038/2013 18:38:45 - INFO  - Android version : 4.0.4 / kernel version : 3.0.8+ / Build number : 6.1.1.B.1.54
07/046/2013 18:46:50 - INFO  - Device connected in flash mode
07/046/2013 18:46:52 - INFO  - Device disconnected
07/049/2013 18:49:04 - INFO  - Selected xperia u_6.1.1.B.1.54_World kernel.ftf
07/049/2013 18:49:04 - INFO  - Preparing files for flashing
07/049/2013 18:49:04 - INFO  - Please connect your device into flashmode.
07/049/2013 18:49:15 - INFO  - Device connected in flash mode
07/049/2013 18:49:15 - INFO  - Opening device for R/W
07/049/2013 18:49:16 - INFO  - Reading device information
07/049/2013 18:49:16 - INFO  - Phone ready for flashmode operations.
07/049/2013 18:49:16 - INFO  - Current device : ST25i - 6.1.1.B.1.54 - WORLD_6.1.1.B.1.54
07/049/2013 18:49:16 - INFO  - Start Flashing
07/049/2013 18:49:16 - INFO  - Processing loader
07/049/2013 18:49:16 - INFO  -     Checking header
07/049/2013 18:49:16 - INFO  -     Flashing data
07/049/2013 18:49:17 - INFO  - Loader : S1_Root_3065 - Version : R5E006 / Bootloader status : NOT_ROOTABLE
07/049/2013 18:49:17 - INFO  - Processing kernel.sin
07/049/2013 18:49:17 - INFO  -     Checking header
07/049/2013 18:49:17 - INFO  -     Flashing data
07/049/2013 18:49:20 - INFO  - Ending flash session
07/049/2013 18:49:20 - INFO  - Flashing finished.
07/049/2013 18:49:20 - INFO  - Please unplug and start your phone


NOTE: This procedure will NOT root your phone.
It will just correct the performance issues (slowness) that everyone is talking about. ūüôā

Oracle VirtualBox: Installing Guest Additions in Fedora 18 (and all others)

Unfortunately you cannot just install VirtualBox Guest Additions  in a fresh Fedora 18 install, as it will require a few additional packages to be installed and a few minutes checking on the logs to identify any possible further issues.

While the Guest Additions are not required to use a CLI-based Virtual Machine,¬† they are essential if you’re using it as a Desktop/Workstation OS (over Windows in this example).

Moving on, here’s the procedure to properly install VirtualBox Guest Additions in Fedora 18.
(This procedure may or may not work for other distros using the same package manager and for other versions of Fedora)

  1. Open a new console window, and type the following commands, one per line (I’ll explain what they do below):

    yum -y update kernel
    yum -y install kernel-devel kernel-headers dkms gcc gcc-c++
    yum -y update

    The commands above will authenticate you as root (su), update your system’s Kernel install the required packages for VirtualBox Guest Additions to work properly.
    Just as a preventative measure, I recommend running “yum update” afterwards, just to ensure you’re up to date on everything else (assuming that this is just a fresh install of Fedora).

  2. In the VirtualBox menu bar, open the “Devices” menu and select “Install Guest Additions”.

    VirtualBox 4.2.6

    VirtualBox Install Guest Additions

  3. Just browse your DVD Drive contents using your file explorer and run from there (it will ask you to re-authenticate as root).

The output should be similar to this:

Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.6 Guest Additions for Linux..........

VirtualBox Guest Additions installer
Removing installed version 4.2.6 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules [ OK ]
Removing existing VirtualBox non-DKMS kernel modules [ OK ]
Building the VirtualBox Guest Additions kernel modules [ OK ]
Doing non-kernel setup of the Guest Additions [ OK ]
Starting the VirtualBox Guest Additions [ OK ]
Installing the Window System drivers
Installing X.Org Server 1.13 modules [ OK ]
Setting up the Window System to use the Guest Additions [ OK ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services componen[ OK ]
Press Return to close this window…


Let the script finish, reboot your Virtual Machine and you’re all set.
Note: I have used VirtualBox 4.2.6 and Fedora 18 (3.7.2-204) in this tutorial.

Exim: Clearing the internal eximstats database (cPanel)

Clearing the eximstats database isn’t something difficult to do via phpMyAdmin or a similar web-based database management application, and shouldn’t harm anything in your system.
However, if you run into any issues, or just want to re-initialize the database and re-create the tables structures manually via SSH, here’s what you should do:

mysqladmin drop eximstats ; mysqladmin create eximstats ; mysql eximstats < /usr/local/cpanel/etc/eximstats_db.sql

If for any reason you do not have your default eximstats .sql file (which includes the database structure), you can copy it from the block below.
Just make sure you save it as /usr/local/cpanel/etc/eximstats_db.sql (pay close attention to the path).

— Host: localhost Database: eximstats
— ——————————————————

/*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */;
/*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */;
/*!40101 SET @[email protected]@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @[email protected]@TIME_ZONE */;
/*!40103 SET TIME_ZONE=’+00:00′ */;
/*!40014 SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @[email protected]@SQL_MODE, SQL_MODE=’NO_AUTO_VALUE_ON_ZERO’ */;
/*!40111 SET @[email protected]@SQL_NOTES, SQL_NOTES=0 */;

— Table structure for table `defers`

/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `defers` (
`mailtime` datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
`msgid` char(16) NOT NULL DEFAULT ”,
`email` char(255) NOT NULL DEFAULT ”,
`transport_method` char(45) DEFAULT ‘remote_smtp’,
`host` char(240) DEFAULT NULL,
`ip` char(60) DEFAULT NULL,
`message` char(240) DEFAULT NULL,
`router` char(65) DEFAULT ”,
`deliveryuser` char(30) NOT NULL DEFAULT ”,
`deliverydomain` char(255) NOT NULL DEFAULT ”,
PRIMARY KEY (`mailtime`,`msgid`,`email`),
KEY `email_mailtime_index` (`email`,`mailtime`),
KEY `msgid_mailtime_index` (`msgid`,`mailtime`),
KEY `deliverydomain_mailtime_index` (`deliverydomain`,`mailtime`),
KEY `deliveryuser_mailtime_index` (`deliveryuser`,`mailtime`),
KEY `email_deliveryuser_mailtime_index` (`email`,`deliveryuser`,`mailtime`)
/*!40101 SET character_set_client = @saved_cs_client */;

— Table structure for table `failures`

/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `failures` (
`mailtime` datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
`msgid` char(16) NOT NULL DEFAULT ”,
`email` char(255) NOT NULL DEFAULT ”,
`transport_method` char(45) DEFAULT ‘remote_smtp’,
`host` char(240) DEFAULT NULL,
`ip` char(60) DEFAULT NULL,
`message` char(240) DEFAULT NULL,
`router` char(65) DEFAULT ”,
`deliveryuser` char(30) NOT NULL DEFAULT ”,
`deliverydomain` char(255) NOT NULL DEFAULT ”,
PRIMARY KEY (`mailtime`,`msgid`,`email`),
KEY `email_mailtime_index` (`email`,`mailtime`),
KEY `deliverydomain_mailtime_index` (`deliverydomain`,`mailtime`),
KEY `deliveryuser_mailtime_index` (`deliveryuser`,`mailtime`),
KEY `email_deliveryuser_mailtime_index` (`email`,`deliveryuser`,`mailtime`),
KEY `msgid_mailtime_index` (`msgid`,`mailtime`)
/*!40101 SET character_set_client = @saved_cs_client */;

— Table structure for table `sends`

/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sends` (
`mailtime` datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
`msgid` char(16) NOT NULL DEFAULT ”,
`email` char(255) NOT NULL DEFAULT ”,
`processed` int(11) DEFAULT NULL,
`user` char(30) NOT NULL DEFAULT ”,
`size` int(11) DEFAULT NULL,
`ip` char(60) DEFAULT NULL,
`auth` char(30) DEFAULT NULL,
`host` char(240) DEFAULT NULL,
`domain` char(255) NOT NULL DEFAULT ”,
`localsender` int(1) DEFAULT ‘1’,
`spamscore` double DEFAULT NULL,
PRIMARY KEY (`mailtime`,`msgid`,`email`),
KEY `mailtime_domain_user_msgid_index` (`mailtime`,`domain`,`user`,`msgid`),
KEY `user_mailtime_index` (`user`,`mailtime`),
KEY `msgid_user_index` (`msgid`,`user`),
KEY `domain_user_mailtime_index` (`domain`,`user`,`mailtime`),
KEY `email_mailtime_user_index` (`email`,`mailtime`,`user`)
/*!40101 SET character_set_client = @saved_cs_client */;

— Table structure for table `smtp`

/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
`mailtime` datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
`msgid` char(16) NOT NULL DEFAULT ”,
`email` char(255) NOT NULL DEFAULT ”,
`processed` int(2) NOT NULL DEFAULT ‘0’,
`transport_method` char(45) DEFAULT ‘remote_smtp’,
`transport_is_remote` int(1) NOT NULL DEFAULT ‘1’,
`host` char(240) DEFAULT NULL,
`ip` char(60) DEFAULT NULL,
`deliveredto` char(255) NOT NULL DEFAULT ”,
`router` char(65) NOT NULL DEFAULT ”,
`deliveryuser` char(30) NOT NULL DEFAULT ”,
`deliverydomain` char(255) NOT NULL DEFAULT ”,
`counteddomain` char(255) DEFAULT NULL,
`countedtime` datetime DEFAULT NULL,
`countedhour` datetime DEFAULT NULL,
PRIMARY KEY (`mailtime`,`msgid`,`email`,`deliveredto`,`router`),
KEY `msgid_index` (`msgid`),
KEY `deliverydomain_mailtime_index` (`deliverydomain`,`mailtime`),
KEY `deliveryuser_mailtime_index` (`deliveryuser`,`mailtime`),
KEY `email_mailtime_index` (`email`,`mailtime`),
KEY `email_deliveryuser_mailtime_index` (`email`,`deliveryuser`,`mailtime`),
KEY `processed_transport_is_remote_index` (`processed`,`transport_is_remote`)
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET [email protected]_TIME_ZONE */;

/*!40101 SET [email protected]_SQL_MODE */;
/*!40014 SET [email protected]_FOREIGN_KEY_CHECKS */;
/*!40014 SET [email protected]_UNIQUE_CHECKS */;
/*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
/*!40101 SET [email protected]_CHARACTER_SET_RESULTS */;
/*!40101 SET [email protected]_COLLATION_CONNECTION */;
/*!40111 SET [email protected]_SQL_NOTES */;

That’s about it. ūüôā

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