How to Add SRV record?

The information provided to you for adding SRV record should be looking like as follows:

My SRV record information
Record Type: SRV
Service: _mytestingsrv
Protocol: _tcp
Port: 443
Weight: 0
Priority: 0
TTL: 300

There is an order to add these records in zone file. Go to WHM >> Home » DNS Functions » Edit DNS Zone. Open the particular domains zone file. Then choose a new field to add up record, select SRV from the selection list.
Now the order should be as “service.protocol 300 IN SRV Priority Weight Port Target(in Hostname field)”

According to my above record information, I have entered the SRV record as follows:

_mytestingsrv._tcp 300 IN SRV 0 0 443

Click save and check SRV record for the domain using DIG command 🙂

$ dig srv

;; ANSWER SECTION: 288 IN SRV 0 0 443

500 No response while loading cPanel

Sometimes the following would be the error generates when we try to load the cPanel of an account.

[2013-04-07 08:15:05 -0500] warn [cpanel] Failed to load cPanel user file for ‘cPanel_username’ at /usr/local/cpanel/Cpanel/Config/ line 32
Internal Server Error: “GET /cpsess7952893738/frontend/x3/index.html?post_login=88039081253834 HTTP/1.1” 500 No response from subprocess ( (cpanel)) with exit signal: 255

This is a permission or ownership issue with the cpanel user file present in the path /var/cpanel/users. It should be corrected as follows:

root@server [~]# ll /var/cpanel/users/cPanel_User_Name
-rw-r—– 1 root cPanel_User_Name 949 Oct 16 01:37 /var/cpanel/users/cPanel_User_Name

load cPanel now 🙂

Mail Client Configuration shows incorrect server name

Sometimes it happen the Mail Client Configuration(cPanel > Email Accounts > any email account in list > More > Configure Email Client) option generates incorrect server name under “Secure SSL/TLS Settings”

The server name can be corrected in the following files of cPanel.


Slow downloading speed from server

This can be of many reasons, might be due to server load, firewall etc. Basically we check these areas when slow downloading speed occurs 🙂

But I have identified one uncommon and not easily notifiable thing on my server regarding with my public Ethernet interface. Please see the following result.

# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Half
Port: Twisted Pair
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: g
Wake-on: g
Link detected: yes

Did you notice the Speed: 100Mb/s and Duplex: Half ?, that is the issue here 😀 which allows only half duplex transmission – transmission to only one direction at a time and thus limits the speed.

You can change to full duplex as follows:

ethtool -s eth0 speed 100 duplex full autoneg off

This will change the half duplex to full which allows sending and receiving at a time. Also set auto-negotiate to off as the switch has this function set to and it is best to match up the options.

(Note : In some server it can be eth1 the public interface and eth0 use for internal network, in that case change eth0 to eth1. Always be careful with that)

Then #service network restart

# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
Transceiver: internal
Auto-negotiation: off
MDI-X: Unknown
Supports Wake-on: g
Wake-on: g
Link detected: yes

Make sure secondary IPs associated with your ethernet are up, if not showing in ifconfig, then restart ipaliases.

#/etc/init.d/ipaliases restart

ERROR : Can’t locate Net/ in @INC

Recently I met with an error in server while checking traffic in and traffic out plugin for monitoring system(Nagios).

Can’t locate Net/ in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/i686-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at /usr/local/nagios/libexec/check_bw_snmp_out line 16.
BEGIN failed–compilation aborted at /usr/local/nagios/libexec/check_bw_snmp_out line 16.

This can be easily fixed by installing Net::SNMP


#cpan> install Net::SNMP

SSI(Server Side Include) Not Working

SSI (Server Side Includes) are directives that are placed in HTML pages, and evaluated on the server while the pages are being served. SSI is to include the contents of one or more files into a web page on a web server. For example, a web page containing a daily quotation could include the quotation by placing the following code into the file of the web page.

The syntax should be as:


This has to be given in the main file where you suppose to include or parse this SSI, ie invoking file.html(SSI) to main file which is present in the same directory.

Sometimes it wont work in server. The following simple steps are the fix for it.

First make sure mod_include.c is enabled in apache modules
Then, In accounts htaccess file

Options +Includes
AddType text/html .html
AddHandler server-parsed .html

Restart apache 🙂 and see the changes.

Install EAccelerator

eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.

#cd /usr/src/
#wget http://path/to/whereeveryou/download/eaccelerator-x.x.x.tar.gz
#tar xzvf eaccelerator-x.x.x.tar.gz

(Make sure you are going to compile it for the PHP version the site using. To confirm it create a phpinfo page in the domain and note the PHP API, PHP Extension and Zend Extension. Because these three things can be seen while compiling through shell, so you can compare if they are same or not)

#./configure –with-php-config=/usr/bin/php-config or /usr/local/bin/php-config

(Get the correct path of “php-config” from your server according to version of PHP the domain using)

#make test (–>you can check if any error is there)
#make install

(Note the extension path in the last, like /usr/lib/php/extensions/no-debug-non-zts-20060613/

Then go to php.ini, lets say “/etc/php5/php.ini”. You can get it from “php –ini” or from the phpinfo page.

#vi /etc/php5/php.ini

(Set the following in php.ini file)


Then create eaccelerator directory and set correct permission.

#mkdir /tmp/eaccelerator
#chmod 777 /tmp/eaccelerator

Restart Apache.

#/etc/init.d/httpd stop
#/etc/init.d/httpd start

Check eaccelerator in the phpinfo page 🙂

Unable to SU to root

The error “ -bash: /bin/su: Permission denied ” you get while trying to su to root after logged as sudo because of the incorrect permission of “ /bin/su “. Make sure you have given correct permission as follows:


# chmod 4750 /bin/su
# ll /bin/su
-rwsr-x— 1 root wheel 24312 Mar 21 2012 /bin/su*

If the problem still exists, check if the sudo user has been added as wheel user in the server. Check it in the file /etc/group like as follow:

wheel::10:root,sudouser (..sudouser should be replaced with correct sudo username)

In case you have no backend access, you can login to WHM and add wheel user there Home »
Security Center »
Manage Wheel Group Users
then choose sudo user from list and click “ Add to Group “.