export: Command not found.

FFMPEG installation failed with following error.

—-
Unable to create and execute files in /tmp.  Set the TMPDIR environment
variable to another directory and make sure that it is not mounted noexec.
Sanity test failed.
—-

Tried the normal fix.

—-
mkdir /usr/local/src/tmp
chmod 777 /usr/local/src/tmp
export TMPDIR=/usr/local/src/tmp
export: Command not found.
—-

On further investigation, noticed that server was using tcsh shell.  All shells don’t support ‘export’.  For example, bash shell support it, but ‘tcsh’ dont support.

You can use command ‘setenv’ in cases like this.

setenv TMPDIR /usr/local/src/tmp

Hope this helps.

Posted in Linux- HOWTOs and FAQs | Leave a comment

MySQL database not showing in cPanel

If database is not showing in cpanel, make sure database exists in the server. If it exists, make sure permission/ownership of database is correct.

Then check whether database details are listed in /var/cpanel/databases/username.yaml

If it is not listed in it, run following command to fix it.

/usr/local/cpanel/bin/setupdbmap

Check cpanel and database should be listed in it.

If database size is zero while listing, run the following command to fix it.

/scripts/update_db_cache

Posted in cPanel | Leave a comment

configure: error: DOM extension requires LIBXML extension, easyapache

While recompiling php using easyapache in a cpanel server, I got stuck with following error:

——-

configure: error: DOM extension requires LIBXML extension, add –enable-libxml
!! ‘./configure –disable-libxml –enable-bcmath –enable-calendar –enable-ftp –enable-gd-native-ttf –enable-magic-quotes –enable-mbstring –enable-pdo=shared –enable-sockets –prefix=/usr/local –with-apxs2=/usr/local/apache/bin/apxs –with-curl=/opt/curlssl/ –with-freetype-dir=/usr –with-gd –with-gettext –with-imap=/opt/php_with_imap_client/ –with-imap-ssl=/usr –with-jpeg-dir=/usr –with-kerberos –with-libexpat-dir=/usr –with-mcrypt=/opt/libmcrypt/ –with-mhash=/opt/mhash/ –with-mysql=/usr –with-mysql-sock=/var/lib/mysql/mysql.sock –with-mysqli=/usr/bin/mysql_config –with-openssl=/usr –with-openssl-dir=/usr –with-pcre-regex=/opt/pcre –with-pdo-mysql=shared –with-pdo-sqlite=shared –with-png-dir=/usr –with-sqlite=shared –with-ttf –with-xmlrpc –with-xpm-dir=/usr/X11R6 –with-zlib –with-zlib-dir=/usr’ failed with exit code ’256′ !!

——

I have applied following fix to get it working.

yum install rpm-build
cd /usr/src
wget http://ftp.man.poznan.pl/pub/linux/fedora/core/5/source/SRPMS/zlib-1.2.3-1.2.1.src.rpm
rpmbuild –rebuild zlib-1.2.3-1.2.1.src.rpm
rpm -Uhv /usr/src/redhat/RPMS/i386/zlib-*1.2.3-1.2.1.i386.rpm

I have noticed this error mainly in centOS 4 version.

Hope this helps.

 

Posted in cPanel | Leave a comment

Dovecot: unable to connect to localhost:143

If you’re using dovecot instead of courier imap in cpanel server and get the following error while trying to login to squirrel mail.

Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:143 (Connection refused) in /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/login_auth/functions.php on line 129

Check whether IMAP service is running. If no, try restarting dovecot.

If imap service is not getting started, open the file /etc/dovecot.conf and add imap/imaps to protocols line as follows:

protocols = pop3 pop3s imap imaps

Then restart dovecot using the command /etc/init.d/dovecot restart

Make sure imap is running.

netstat -lpn |grep dovecot

Posted in cPanel | Leave a comment

Reset whm theme of a reseller account from command prompt

WHM theme of a reseller account can be changed by editing file /home/reseller_user/.whmtheme

To switch to x theme.

echo x > /home/username/.whmtheme

Posted in cPanel | Leave a comment

How to enable HTML Mail Plugin in squirrel mail

Please check the following URL and download latest version of HTML mail plugin.

http://www.squirrelmail.org/plugin_view.php?id=209

cd /usr/local/cpanel/base/3rdparty/squirrelmail/plugins
wget http://www.squirrelmail.org/countdl.php … 1.4.tar.gz (latest version when I tried it)
tar xzf html_mail-2.3-1.4.tar.gz
chown -R root.wheel html_mail

cd /usr/local/cpanel/base/3rdparty/squirrelmail/config
perl conf.pl

It will show a menu with corresponding number. Enter 8 for plugins. It will show the installed & available plugins. Enter the number corresponding to html_mail and press enter. It will be installed and listed under available plugins.

Now enter S to save.

Now login to squirrel mail, click Options >> Display Preference and Select Default Email Composition Format as HTML.

Start sending mails in html format :)

Posted in cPanel | Leave a comment

Unable to send mail via RoundCube

Check the log file /var/cpanel/roundcube/log/errors and if you’re getting the following error:

SMTP Error: SMTP error: Authentication failure: STARTTLS failed (Code: ) in /usr/local/cpanel/base/3rdparty/roundcube/program/steps/mail/func.inc on line 1248 (POST /3rdparty/roundcube/index.php?_task=mail&_action=send)
PHP Warning: ob_start() [<a href='ref.outcontrol'>ref.outcontrol</a>]: output handler ‘ob_gzhandler’ cannot be used after ‘URL-Rewriter’ in /usr/local/cpanel/base/3rdparty/roundcube/index.php on line 45
STARTTLS failed ():
Invalid response code received from server (421):
Invalid response code received from server (-1):

Run the following command to fix it.

/scripts/autorepair net_smtp_fix

Posted in cPanel | Leave a comment

Fantastico is not installed at the default location

If you get the following error when you access Fantastico from a cpanel account: 

Fantastico is not installed at the default location /usr/local/cpanel/3rdparty/fantastico. Either move the Fantastico directory from it’s current location to /usr/local/cpanel/3rdparty/fantastico OR enable ioncube loaders in WHM -> Tweak settings.

If fantastico is installed in the correct path and Ioncube is enabled, run the following command:

/scripts/makecpphp

Which will rebuild the copy of PHP that cPanel and WHM use, and not apache php.

 

Posted in cPanel | Leave a comment

exim: ** [535 Incorrect authentication data != 2]

Error:

Exim status is not showing correctly in WHM >> Service Status and if you get mail with the following error:

———————————-
exim failed @ Tue Mar 24 22:57:24 2009. A restart was attempted automagically.
Service Check Method: [tcp connect]

Failure Reason: TCP Transaction Log:
<< 220-***.******.com ESMTP Exim 4.69 #1 Tue, 24 Mar 2009 22:57:49 -0400 << <<
>> EHLO localhost
<< 250-***.******.com Hello localhost [127.0.0.1] << << << << <<
>> AUTH PLAIN
>> AF9fY3BhbmVsX19zZXJ2aWNlX19hdXRoX19leGltX19sRE96V0hpWjVoS2dPakJhdld2O
>> G0xNThXXzF5Nmw1VlVLSms3U3VCTjV4ZkxyeGdwMWNyZ1ZxX0h0M3hISTNzAFc1V0p4ME
>> pQRjJpN1lWWmtKR2NBUlUxY29RbFRNQjNrVjVuN0RHV3hOWjVrT0JkSVpZU3ZqY1RiT1h
>> RZWZfNWs=
<< 535 Incorrect authentication data
exim: ** [535 Incorrect authentication data != 2]
———————————-

Fix:

cd /var/cpanel/serviceauth/
rm -rf exim
/etc/init.d/exim restart

Posted in cPanel | Leave a comment

All Mailman web pages give a 404 File not found error.

Error:

All Mailman web pages give a 404 File not found error.

Fix:

Check the mail permission using the script ./check_perms inside /usr/local/cpanel/3rdparty/mailman/bin/

If you get the following warning:

—————–
Warning: Private archive directory is other-executable (o+x).
This could allow other users on your system to read private archives.
If you’re on a shared multiuser system, you should consult the
installation manual on how to fix this.
—————–

Fix:

cd /usr/local/cpanel/3rdparty/mailman/archives
chown nobody private
chmod o-x private

Permission of private directory should be as follows:

drwxrws— 14 nobody mailman 4096 Mar 18 15:35 private

Hope this helps :)

Posted in cPanel | Leave a comment