Archive for June, 2009

SBDavid

Account Creation Failed

Account Creation Failed

While creating an account via WHM, you may get an error stating that, cannot create new user.

You can check the cPanel logs for the error.

tail -f /usr/local/cpanel/logs/error_log

Sometimes, you may get the following error.

vipw lockfile (/etc/ptmp) is present!

This means that the “useradd” is locked. You will not be able to add new users unless you remove the following file.

You can also confirm it by executing the useradd command in the konsole. You will receive an error message stating the above.

useradd user1

Check if this file is present.

ls -l /etc/ptmp

/etc/ptmp >> This has a temporary copy of the password file. This file can be removed.

rm -f /etc/ptmp

SBDavid

Cpanel WHM: License expired error

Cpanel WHM: License expired error

If “License expired” error is encountered while accessing the cpanel/whm, it can be fixed by following below mentioned steps:

1. Check whether the license is expired.

This is the most obvious cause and simple to verify. Access the URL ‘http://verify.cpanel.net/’ and check the IP of the server.

2. If it is “active”, Run the following command:

$ /usr/local/cpanel/cpkeyclt

This should promptly return to the command line with no messages. If it takes a while, then there is likely a connectivity issue between your server and the licensing server.

3. In that case, check whether the firewall is blocking connections to the licensing server.

Verify that port 2089 TCP outgoing traffic is allowed in the firewall rules.

4. If you’re not sure that your firewall is properly configured, then the best thing to do is temporarily flush your firewall rules. Before flushing the firewall rules, you need to save the firewall rules enabled in the server.

$ /etc/init.d/iptables save

After that you can flush your firewall rules using the command

$ iptables -F
SBDavid

MySQL Socket Error in phpMyAdmin

MySQL Socket Error in phpMyAdmin

While accessing phpMyAdmin, you may get the following error.

#2002 - The server is not responding (or the local MySQL server’s socket is not correctly configured)

This is due to the missing socket file in the location /tmp.

The socket path which is specified in the phpMyAdmin configuration file is /tmp/mysql.sock.

$ vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
cfg['Server']['socket'] = ‘/tmp/mysql.sock’;

If mysql.sock is missing in /tmp, then create a link to the mysql.sock file in /var/lib/mysql.

$ ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

There is also another fix for this issue.

1. Open the phpMyadmin config file “config.inc.php”.
vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php

2.Locate the line:

$cfg['Servers'][$i]['host'] = ‘localhost’;

3.Replace ‘localhost’ with ‘127.0.0.1′ and save.

$cfg['Servers'][$i]['host'] = ‘127.0.0.1′;

This will also fix the issue.

SBDavid

Round Cube Installation

Round Cube Installation

Remove the previous traces of Roundcube in the server.

cd /usr/local/cpanel/base
rm -rf roundcube*
mysql
mysql>drop database roundcube;

Before starting the installation, you need to know the root password of Mysql

cd /usr/local/cpanel/base
wget http://easynews.dl.sourceforge.net/sourceforge/roundcubemail/roundcubemail-0.1beta2.1.tar.gz
tar -zxvf roundcubemail-0.1beta2.1.tar.gz
mv -f roundcubemail-0.1beta2 roundcube
cd roundcube
chmod -R 777 temp
chmod -R 777 logs

Create the database. Find mysql root password from /root/.my.cnf.
Login as user, root.

mysql -u root -p
Password:
mysql>CREATE DATABASE roundcube;
mysql>use roundcube;
mysql>source SQL/mysql.initial.sql;
mysql>quit

Add the configuration:

cd config
mv db.inc.php.dist db.inc.php
mv main.inc.php.dist main.inc.php

Edit the configuration files

using your text editor edit db.inc.php

Find:
$rcmail_config[’db_dsnw’] = ‘mysql://roundcube:pass@localhost/roundcubemail’;
Replace with:
$rcmail_config[’db_dsnw’] = ‘mysql://root:rootpass@localhost/roundcube’;
#vi main.inc.php

Replace the corresponding root password

Find:
$rcmail_config[’default_host’] = ”;
Replace with:
$rcmail_config[’default_host’] = ‘localhost’;

Configure cPanel to show roundcube in the theme. X theme(default) only!!

cd /usr/local/cpanel/base/roundcube/skins/default/images/
cp roundcube_logo.png /usr/local/cpanel/base/frontend/x/images/roundcube_logo.png
cp roundcube_logo.png /usr/local/cpanel/base/webmail/x/images/roundcube_logo.png
wget http://www.yourserverguide.com/Files/HGpatch-roundcube-1.0BETA2.1
patch -p0 < HGpatch-roundcube-1.0BETA2.1

If you receive a message stating: Reversed (or previously applied) patch detected! Assume -R? Please press N for No as this is because you previously installed roundcube

This will auto do all the necessary changes to roundcube and the X theme. Once the patch is executed you may now access roundcube via http://yourdomain/webmail

SBDavid

Upgrade Perl to 5.8.8 (Cpanel 11.4.2)

Upgrade Perl to 5.8.8 (Cpanel 11.4.2)

The cpanel 11 requires perl version 5.8.8. To upgrade the perl version in the server you can use following steps:-

1. Download perl 5.8.8 using following link:-

# wget http://layer1.cpanel.net/perl588installer.tar.gz

2. Untar the tar package using following command

# tar -vzxf perl588installer.tar.gz

3. Then Install

# cd perl588installer
# ./install

Once this has completed, execute the following to ensure that all modules required by cPanel are installed, and restart cPanel:

/usr/local/cpanel/bin/checkperlmodules
/usr/local/cpanel/startup

4. Check and confirm the perl version using the command:

perl -v

« Prev - Next »