Patch
Patches are the fixes for an existing installation of Cacti. You should always keep a eye on http://cacti.net/download_patches.php, so that you are not missing any patches.
First, enter into your cacti
directory:
$ cd /var/www/cacti
Then, download the patch from http://cacti.net/download_patches.php.
$ wget http://www.cacti.net/downloads/patches/0.8.7b/upgrade_from_086k_fix.patch
You have to downloaded all the patches that are available for your version of Cacti.
Now, time to apply the patch:
$ patch -p1 -N < upgrade_from_086k_fix.patch
Done, your Cacti is ready!