Thursday, 26 June 2014

Cannot edit DNS zone after cPanel update

Issue :


After updating all the cPanel software, following error occurs when trying to Edit a DNS zone :


Unable to parse zone: Error while parsing zonedata for *DOMAIN NAME HERE*.com: expected valid rname, line 4 …propagated at /usr/local/cpanel/Cpanel/CPAN/Net/DNS/ZoneFile/Fast.pm line 142.


Fix :


The error means that the dns zone has invalid data in it and it cannot be loaded. So you need to recreate the zone to fix this.


You can use the following cPanel script to do this :


/scripts/pkgacct accountname ( just to backup the account)


/scripts/killdns domainname


/scripts/adddns –domain domainname


Please note that while recreating the domain using the above script it will not create the sub-domain. It will create the default DNS records. You can also specify the ip address using ” –ip X.X.X.X ” option


After running the scripts, you can manually add the entries for the sub-domains .



Cannot edit DNS zone after cPanel update

To make writable session save path

Just put the following code in your .htaccess


php_value session.save_path ‘/tmp’




To make writable session save path

Upcp Gets Killed Automatically

Do The Following if /scripts/upcp –force gets killed automatically.


wget -O scripts.tar.bz2


http://httpupdate.cpanel.net/cpanelsync/RELEASE/scripts.tar.bz2


tar -x -v -C / -j -p -f scripts.tar.bz2


chmod 755 /scripts/cpanelsync


/scripts/cpanelsync httpupdate.cpanel.net /cpanelsync/RELEASE/scripts


/scripts/upcp –force



Upcp Gets Killed Automatically

Error while connecting to MySQL. Failover enacted

Mysql Error on the Cpanel server.


Error while connecting to MySQL. Failover enacted.


Fix :: Just Login to ssh and run the following command to fix the above error.

/scripts/perlinstaller --force DBD::mysql




Error while connecting to MySQL. Failover enacted

How to repair Grub loader



GNU GRUB (“GRUB” for short) is a boot loader package from the GNU Project. GRUB is the reference implementation of the Multiboot Specification, which allows a user to have several different operating systems on their computer at once, and to choose which one to run when the computer starts. GRUB can be used to select from different kernel images available on a particular operating system’s partitions, as well as to pass boot-time parameters to such kernels.


Every once in a while windows may have the inclination to overwrite your bootloader with its own. This will make accessing your system impossible.
Well, there is a solution to override the 512 Kb of your drive that represent the MBR.
In the fact you can follow these steps to repair your GRUB loader:
Boot your PC with a Live CD in the drive, after run fdisk to display list of your partitions system.


$ sudo /sbin/fdisk -l


Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa588e9cb


Device Boot Start End Blocks Id System
/dev/sda1 * 1 30071 241545276 83 Linux
/dev/sda2 30072 30401 2650725 5 Extended
/dev/sda5 30072 30401 2650693+ 82 Linux swap / Solaris


In that fdisk example, the root linux partition reside in /dev/sda1
Create a directory /mnt/root and mount the linux partition.


$ sudo mkdir /mnt/root
$ sudo mount /dev/sda1 /mnt/root


Change the root “/” directory to our old root directory the /mnt/root
$ sudo chroot /mnt/root /bin/bash


Execute the grub command
$ sudo grub –config-file=/boot/grub/menbu.lst

GNU GRUB version 0.97 (640K lower / 3072K upper memory)


[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]


Now we need to tell grub where are the grub files:
If you don’t know where they are, type:
grub> find /boot/grub/stage1
(hd0,0)


Now type the following, replacing hd0 with the physical drive linux is installed
grub> root (hd0,0)


Remember that for grub (hd0,0) means hda (primary controller master), first partition.
Let’s install the grub on hd0
grub> setup (hd0,0)
grub> quit


$ sudo reboot
Now you can reboot safely, with your linux system. –Ali






How to repair Grub loader

Turn off bandwidth monitoring

Go to WHM >> Service Configuration >> Service Manager.
Look for ‘cPBandwd’. Make sure that the check box besides that is unchecked.
Save the settings and that should be it !



Turn off bandwidth monitoring

How To Reinstall Horde

To reinstall Horde, preserving the existing database, you can use the following:


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



How To Reinstall Horde