Category Archives: cPanel/WHM

Error when updating email address of DNS zone – cPanel / WHM

When trying to update the email address in DNS zone of a domain from cPanel / WHM, do you get an error like this :

“Unable to parse zone: There was an error while loading the zone for domain.com. Please correct any errors in this zone manually and try again. The exact error from the parser was: : [] zon”

Very small mistake though ūüėÄ

When changing the email address, be sure not to use an “@” symbol. Instead, use a dot “.”, and be sure to add a trailing dot as well.

For example, if you wanted to change the email address to test@domain.com, you’d change this to:

==============
test.domain.com.
==============

What a minor one was that ūüėÄ

locale error in CentOS 6 !

Recently saw the issue in newly build CentOS6 VMs ( For me it was Virtuozzo based VMs ) :

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)

Saw this error even after installing cPanel in the VPS.

This warning popped up every time you ran a command in shell, though it did not cause any issues

The fix was to run the following command :

localedef --no-archive -i en_US -f UTF-8 en_US.UTF-8

Should be good now !

 

Issue with CurlSSL on CentOS 4 ! ( Ye, too old :P )

We are talking about CentOS 4 and CurLSSL here. We may have some legacy users facing this issue in enabling CurLSSL.

This was the error encountered :

=======
vtls/openssl.c: In function `Curl_ossl_init’:
make[2]: *** [vtls/libcurl_la-openssl.lo] Error 1
make[2]: Leaving directory `/home/cpeasyapache/src/curl-7/lib’
make[1]: Leaving directory `/home/cpeasyapache/src/curl-7/lib’
dryrun test ‘Find Curl SSL path for PHP 5’ did not return true
!! Dry run failed for ‘Cpanel::Easy::PHP5::CurlSSL’ skipping option !!
— End opt ‘CurlSSL’ —
checking for cURL support… no
checking if we should use cURL for url streams… no
vtls/openssl.c:753: error: `CONF_MFLAGS_DEFAULT_SECTION’ undeclared (first use in this function)
=======

When building curlssl in /home/cpeasyapache/src/curl-7,  this error can be corrected by adding the following :

#ifndef CONF_MFLAGS_DEFAULT_SECTION
#define CONF_MFLAGS_DEFAULT_SECTION 0x0
#endif

to ¬†the file –

/home/cpeasyapache/src/curl-7/lib/vtls/openssl.c

Once this is done, we were able to complete the curlssl compile with ‘make’

You should be able to implement this by moving the old curlssl away and manually installing the modified source tree;

mv /opt/curlssl /opt/curlssl.old

cd /home/cpeasyapache/src/curl-7

make install

EasyApache should use this installed version when it builds next and you will see CurLSSL enabled !

 

cPanel upgrade fails from 11.54 – Services broken !

A recent upgrade from cPanel / WHM 11.54 resulted in the services getting broken and not able to access the services.  Was able to find the following in the logs when attempt to restart cPanel was made :

Can’t locate Unix/PID/Tiny.pm in @INC (you may need to install the Unix::PID::Tiny module) (@INC contains: /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/522/lib64/

The perl module Unix::PID::Tiny is missing which is causing the issues here. The fix would be to rebuild the RPM db.

Follow the steps given below to take backup of current RPM db and rebuild the RPM db:

cd /var/lib
mv rpm{,.old}
mkdir -p rpm
rpm --initdb
cp rpm.old/Packages rpm
rpm --rebuilddb

Kill the hanging RPM or upcp processes if any with the kill -9 $PID command. To find if there are any PIDs, run the following :

ps aux|grep rpm
ps aux|grep upcp

Once this is done, try for an upgrade :

/scripts/check_cpanel_rpms --fix
/scripts/upcp --force

Not able to delete files from file manager – Paper lantern theme

When cPanel is viewed using the Paper lantern theme, there was an error in which we were not able to delete any files over the file manager.

When loading over the Chrome, got the following in console :

utilities_container.js:13 Uncaught TypeError: Cannot set property ‘className’ of nullshow_panel @

As a workaround for this, tried re-installing the cPanel Paper lantern theme.

Removing Paper Lantern can be done by deleting its config folder or putting it in a separate folder.

#  mv /usr/local/cpanel/base/frontend/paper_lantern /root/jo

To re-install the theme simply run a cPanel update :

/scripts/upcp --force

This should fix the issue ! Atleast it worked for me ūüėÄ

cPanel service failing to start with a Perl error !

When trying to start the cPanel service via /scripts/restart_cpsrvd, was getting the following error :

cpsrvd: Setting up native SSL support … Can’t locate auto/Net/SSLeay/EC_KEY_new_.al in

The simple fix was to re-install the Net::SSLeay perl module

This can be done via SSH :

/scripts/perlinstaller Net::SSLeay

 

Installing MySQLnd in your cPanel server !

You might want to install the the MySQL native driver for PHP (MySQLnd) over the custom MySQL driver provided with the default EasyApache.

To enable this manually, you will need to edit the file :

/var/cpanel/easy/apache/rawopts/all_php5 and make sure the following entries are in place there :

–enable-mysqlnd
–with-mysqli=mysqlnd

Save the above file, run EasyApache from WHM and recompile as normal.

 

Fix – “Cannot load from mysql.proc, The table is probably corrupted”

For someone who upgraded MySQL from versions 5.0.x to something like 5.5.x, this error might be a familiar one :

“Cannot load from mysql.proc. The table is probably corrupted”

The database activities would not work as expected and hence you will need to fix this error at the earliest.

The recommended solution from MySQL is to run the mysql_upgrade script which examines all tables in all databases for incompatibilities with the current version of MySQL Server.

mysql_upgrade also upgrades the system tables so that you can take advantage of new privileges or capabilities that might have been added.

You can do this by :

# mysql_upgrade -u root

If you are using a cPanel based system, just run

# mysql_upgrade

To force the check, run

#  mysql_upgrade --force

Does this result in an error ? “”FATAL ERROR: Upgrade failed””

Look for the logs when this happens and try to spot if some invalid db folders are getting listed during the upgrade.

It might be something like :

mysqlcheck: Got error: 1102: Incorrect database name ‘#dbname#.bk’ when selecting the database

The above error indicates you have an invalid db under the mysql dbs folder, usually – /var/lib/mysql.

Navigate to /var/lib/mysql and find if there are any folders with any extension ( keep only valid db folders and move everything else, like backed up files or so from there )

Once this is complete, re-run the mysql_upgrade script !

 

Getting an empty /etc/userdomains file ?

Even though you have several domains, do you see an empty /etc/userdomains file ? This issue can pop up at times when your disk space gets filled up and the cPanel services malfunction. All you need to do is to update the cPanel domain- config files. This can be done by the script :

# /scripts/updateuserdomains

Now, you will be able to see the domains listed !