Cpanel PHPMyAdmin Error: You should upgrade to MySQL 5.0.15

Filed Under (Cpanel, Linux Tips, MySQL) by Milind on 29-01-2012

Problem:
If you are using MySQL Server version 4.x.x on your server but when you try to access PHPMyAdmin from Cpanel you will get following Error:

phpMyAdmin – Error
You should upgrade to MySQL 5.0.15 or later.

Due to your application configuration or any other reason you want to access PHPMyAdmin without upgrading MySQL version to 5.x.

Solution:
To fix this issue you should have root level access to your Server (if you are on shared server please contact your hosting company).

1) Login to server (SSH) using root login credentials.
2) Remove “_usr_bin_mysql_config_–version” file using following command

root@server [~]# rm -f /root/.cpanel/datastore/_usr_bin_mysql_config_–version

3) Now update your PHPMyAdmin (forcefully) with following command

root@server [~]# /usr/local/cpanel/bin/updatephpmyadmin –force
patching file config.sample.inc.php
patching file db_operations.php
patching file libraries/auth/http.auth.lib.php
patching file libraries/common.inc.php
patching file libraries/db_links.inc.php
patching file libraries/navigation_header.inc.php
patching file libraries/session.inc.php
patching file main.php
patching file server_privileges.php
cPanel authentication library installed.
cPanel API interface library installed.
phpMyAdmin updated to 3.3.8.1-all-languages.cp5

Now try to access PHPMyAdmin

CLAMAV ERROR: Can’t open/parse the config file

Filed Under (Cpanel, Linux Tips) by Milind on 17-01-2012

After installation OR while updating ClamAV Antivirus (using command /usr/local/bin/freshclam -v) it gives following Error

[root@server ~]# /usr/local/bin/freshclam -v -l /var/log/clam-update.log
ERROR: Please edit the example config file /usr/local/etc/freshclam.conf
ERROR: Can't open/parse the config file /usr/local/etc/freshclam.conf
[root@server ~]#


This error shows that the ClamAV configuration file still the default one which is bundled with the the installation Sources. To fix this error open /usr/local/etc/freshclam.conf and search and change

FROM:
# Comment or remove the line below.
Example

TO:
# Comment or remove the line below.
#Example


Now try to update ClamAV

[root@server ~]# /usr/local/bin/freshclam -v -l /var/log/clam-update.log
Current working dir is /usr/local/share/clamav
Max retries == 3
ClamAV update process started at Fri Oct  9 11:29:18 2009
Using IPv6 aware code
Querying current.cvd.clamav.net
TTL: 748
Software version from DNS: 0.95.2
main.cvd version from DNS: 51
main.cvd is up to date (version: 51, sigs: 545035, f-level: 42, builder: sven)
daily.cvd version from DNS: 9876
daily.cvd is up to date (version: 9876, sigs: 83897, f-level: 43, builder: ccordes)
[root@server ~]#

/usr/local/bin/freshclam -v -l /var/log/clam-update.log

Monitor Threads and Performance of MySQL Database using “MyTop”

Filed Under (Cpanel, DirectAdmin, Linux Tips, MySQL) by Milind on 12-01-2012

Database plays a very important part in any CMS or website as it stores the complete data but this database sometime becomes headache. Your website start running slow and when you contact your hosting company you get reply “You need to optimize your database” OR sometime for hosting company also its very hard to explain high resource usage by MySQL Database as usually System Admins are depended on “top” command which doesn’t provide accurate information.

MyTop is a console based utility which helps user to monitor the threads and performance of MySQL Database Server. This utility is easy to install and useful for Database Administrators, Server Administrators. In this article I will explain how to install and use MyTop.

1) Download: Download latest version of myTop from http://jeremy.zawodny.com/mysql/mytop/ using command wget

root@server [~]# wget http://jeremy.zawodny.com/mysql/mytop/mytop-1.6.tar.gz

mtop1 300x44 Monitor Threads and Performance of MySQL Database using MyTop

2) Extract and go to mytop directory

root@server [~]# tar -zxvf mytop-1.6.tar.gz
root@server [~]# cd mytop-1.6
root@server [~/mytop-1.6]

mtop2 300x239 Monitor Threads and Performance of MySQL Database using MyTop

3) Installation of MyTop: Copy and Paste following commands to install MyTOP on your Server

root@server [~/mytop-1.6]# perl Makefile.PL
root@server [~/mytop-1.6]# make
root@server [~/mytop-1.6]# make test
root@server [~/mytop-1.6]# make install

mtop3 300x113 Monitor Threads and Performance of MySQL Database using MyTop

4) Configure MyTop: To get results from MyTop you have user various command-line arguments like username, password, hostname (you can check all options using command “man mytop”)etc. everytime OR you can setup a config file and mention everything in that.
Create and open file “~/.mytop” (copy and paste name as written) using your favraite editor and then copy paste following conent

user=[database user]
pass=[password of the user]
host=[IP or hostname of the host]
db=[database name]
delay=5
port=[Port Number]
socket=
batchmode=0
header=1
color=1
idle=1

Make sure it should look like:

mtop4 300x161 Monitor Threads and Performance of MySQL Database using MyTop

5) Checking Mysql Usage: You can check the MySQL usage using command “mytop

root@server [~]# mytop

Which will show output like below

mtop5 300x56 Monitor Threads and Performance of MySQL Database using MyTop

*** Problem: When you execute mytop you will get error “Error in option spec: “long|!”

root@server [~/mytop-1.6]# mytop
Error in option spec: “long|!”
root@server [~/mytop-1.6]#

mtop6 300x42 Monitor Threads and Performance of MySQL Database using MyTop

To fix this error you have to edit mytop script. To find the exact path of mytop script use command “which

root@server [~]# which mytop
/usr/local/bin/mytop
root@server [~]#

Now edit “/usr/local/bin/mytop” using any editor like vi, nano etc. and change

“long|!” => \$config{long_nums},

TO:

“long|long_nums|l!” => \$config{long_nums},

Save and Exit and you will able to run mytop without any problem.

FIX:- error while loading shared libraries: libdns.so.22

Filed Under (Cpanel, Linux Virtuozzo) by Milind on 10-01-2012

Recently while restarting DNS service on Cpanel VPS it shows following errors:

[root@support ~]# /etc/init.d/named start
Starting named: /usr/sbin/named: error while loading shared libraries: libdns.so.22: cannot open shared object file: No such file or directory
[FAILED]

[root@support ~]# /etc/init.d/named start
Starting named: /usr/sbin/named: error while loading shared libraries: libisc.so.11: cannot open shared object file: No such file or directory
[FAILED]

We have checked and found that the OS template [CentOS 5.3] has been update to [CentOS 5.4] due to will all the binaries of the VPS has been updated as well. For temporary work around I have copied the libdns.so and libisc.so to libdns.so.22 and libisc.so.11.

[root@support ~]# cd /usr/lib
[root@support lib]# cp libdns.so libdns.so.22
[root@support lib]# cp libisc.so libisc.so.11

After that we were able to restart named server

[root@support lib]# service named restart
Stopping named:                                            [FAILED]
Starting named:                                             [  OK  ]
[root@support lib]#

FIX:- Can’t locate cPScript/SafeRun/Timed.pm

Filed Under (Cpanel) by Milind on 01-01-2012

Sometime on Cpanel while running /scripts/easyapache OR /scripts/upcp OR any other script which is provided by Cpanel gives following Error

Can't locate cPScript/SafeRun/Timed.pm in @INC (@INC contains: /usr/local/cpanel /scripts /usr/local/lib/perl5/5.8.8/x86_64-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at /scripts/cPScript/CachedCommand.pm line 14.
BEGIN failed--compilation aborted at /scripts/cPScript/CachedCommand.pm line 14.
Compilation failed in require at /scripts/cPScript/DnsRoots.pm line 15.
BEGIN failed--compilation aborted at /scripts/cPScript/DnsRoots.pm line 15.
Compilation failed in require at /scripts/cPanelPerl.pm line 13.
BEGIN failed--compilation aborted at /scripts/cPanelPerl.pm line 13.
Compilation failed in require at /scripts/realperlinstaller line 18.
BEGIN failed--compilation aborted at /scripts/realperlinstaller line 18.

It mainly happens when server is running on an outdated OR Old version of WHM Release. If you have any another Cpanel server just copy /scripts/cPScript directory from there to the server facing problem (Make sure that the cpanel scripts are working there) OR Contact your hosting company to do it for you. After that just update the Cpanel using command /scripts/upcp –force .

Install and Configure CSF on a VPS (Part-II)

Filed Under (Cpanel, DirectAdmin, Linux Tips, Plesk For Linux) by Milind on 30-12-2011

In previous Article I have explain how to enable Firewall modules on Virtuozzo or OpenVZ based node. Today I am going to explain how to install and configure CSF Firewall on a VPS.

ConfigServer Security and Firewall (CSF) is a free product developed by “ConfigServer Services” and this Firewall is successfully tested on following Operating System

RedHat v7.3, v8.0, v9.0
RedHat Enterprise v3, v4, v5 (32/64 bit)
CentOS v3, v4, v5 (32/64 bit)
Fedora Core v1 to v12(32/64 bit)
*Ubuntu v6.06 LTS, v8.10, v9.10
*Debian v3.1, v4.0, v5.0
*Mandriva 2009
*Gentoo
*openSUSE v10, v11
*Slackware v12.2
* may require custom regex patterns for some functions

Installation of CSF

Before installation of CSF make sure you have Perl 5.8.8 and perl-libwww-perl (Perl Module) is installed on your Server. If they are not installed you can install it using YUM.

yum install perl perl-libwww-perl

Now copy and paste Following Commands After “#” to install CSF on a VPS

To Download CSF:- # wget http://www.configserver.com/free/csf.tgz
Extract zip:- # tar -xzvf csf.tgz
Go to CSF Directory:- # cd csf
Install CSF:- # ./install.sh

Configuration of CSF

To Configure CSF (Basic Configuration) open/Edit CSF Configuration File at /etc/csf/csf.conf file and make following changes

1) Disable Testing Mode

Change
TESTING = "1"
to
TESTING = "0"

2) Enable incoming and outgoing Ports.

Search for “TCP_IN” and add following ports for respective control panels

Cpanel = "20,21,22,25,26,53,80,110,143,443,465,993,995,2082,2083,2086,2087,2095,2096"
Plesk = "20,21,22,25,53,80,110,143,443,465,993,995,8443,8880"
DirectAdmin = "20,21,22,25,53,80,110,143,443,2222"

Search for “TCP_OUT” and add following Ports

Cpanel = "21,22,25,26,27,37,43,53,80,110,113,443,465,873,2089"
Plesk =  "20,21,22,25,53,37,43,80,113,443,465,873,5443"

Search “UDP_IN

Cpanel = "20,21,53,953"
Plesk =  "37,53,873"
DirectAdmin = "21,53,873"

Search “UDP_OUT

Cpanel = "20,21,53,113,123,873,953"
Plesk = "53,873"

**I have used Default port for CSF Configuration and if you have any customized OR additional Port, you can add it in CSF Configuration.

Save and Exit the file. Now you can restart the Firewall using command “csf -r

Awstat Error: LogFormat parameter setup does not match this format

Filed Under (Cpanel) by Milind on 27-12-2011

I have migrated a Cpanel based website from one server to another but after migration, AWStat stopped updating. While updating AWstats was showing following error

awstat 300x61 Awstat Error: LogFormat parameter setup does not match this format


When I checked the domlogs of the domain it shows following entries only

root@server [~]# cat /usr/local/apache/domlogs/domainname.com
combined
combined
combined
combined

I have searched online and found that the LogFormat was not properly defined in httpd.conf file, due to which apache was just logging the word “combined” over and over instead of the correct information.

To fix the issue

1) I have added following LogFormat in httpd.conf file

LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\”" combined


2)
Restarted Apache Service.

Install ImageMagick and PHP-iMagick

Filed Under (Cpanel, Linux Tips, Plesk For Linux, Softwares) by Milind on 04-11-2011

What is ImageMagick?

ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats and it is used to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

What is PHP-iMagick?

Imagick is a native php extension to create and modify images using the ImageMagick API

Installation of ImageMagick

1) Download the latest version of ImageMagick from ImageMagick website i.e. http://www.imagemagick.org/script/download.php (select the mirror near to your server for fast download). Use following command to download ImageMagick

[root@support007 src]# wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.5.7-10.tar.gz

im1 300x143 Install ImageMagick and PHP iMagick

2) Extract and go inside the ImageMagick Folder

[root@support007 src]# tar -zxf ImageMagick-6.5.7-10.tar.gz[root@support007 src]# cd ImageMagick-6.5.7-10

3) Configure: You can run ./configure –help to see the advance option and select the options as per your requirement. I will go ith default settings/configurations

[root@support007 ImageMagick-6.5.7-10]# ./configure

im2 300x143 Install ImageMagick and PHP iMagick

4) Once configure completes (without Error) and you get following screen run make & make install


im3 300x143 Install ImageMagick and PHP iMagick

[root@support007 ImageMagick-6.5.7-10]# make

im4 300x143 Install ImageMagick and PHP iMagick
im5 300x143 Install ImageMagick and PHP iMagick

[root@support007 ImageMagick-6.5.7-10]# make install

im6 300x143 Install ImageMagick and PHP iMagick
im7 300x143 Install ImageMagick and PHP iMagick

If the above commands get executed without any errors, !!! Congratulations you have installed ImageMagick on your Server. Now you can check the Imagemagick version using following command

[root@support007 src]# convert -versionVersion: ImageMagick 6.5.7-10 2009-12-07 Q16 http://www.imagemagick.orgCopyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

im8 300x143 Install ImageMagick and PHP iMagick

Installation of PHP-iMagick

1) Download, extract and go to PHP-iMagick directory

[root@support007 src]# wget http://pecl.php.net/get/imagick-2.3.0.tgz[root@support007 src]# tar zxf imagick-2.3.0.tgz[root@support007 src]# cd imagick-2.3.0[root@support007 imagick-2.3.0]#

im13 300x98 Install ImageMagick and PHP iMagick

2) Execute phpize command to prepare the build environment for a PHP extension and after that run “./configure”

[root@support007 imagick-2.3.0]# phpize[root@support007 imagick-2.3.0]# ./configure

im9 300x143 Install ImageMagick and PHP iMagick

3) Run make and make install to complete the installation.

[root@support007 imagick-2.3.0]# make[root@support007 imagick-2.3.0]# make install

im11 300x143 Install ImageMagick and PHP iMagick

im12 300x143 Install ImageMagick and PHP iMagick

4) Add following line in php.ini file to enable imagick extension with PHP. Make sure that the extension is installed in the Directoy mentioned as extension_dir in php.ini

extension=imagick.so

5) Restart Apache Webserver and create a PHPINFO file in web server’s document root with code “”. Now browse the File and check if you get following results

im14 284x300 Install ImageMagick and PHP iMagick

Future cPanel Interface Screens

Filed Under (Cpanel, News) by Milind on 28-09-2011

cPanel is one of the leading Control panel providers for Webhosting companies. cPanel UI and Design team is now working on a complete new layout, features which will make cPanel more user friendly and easy to use for user (from Newbie to Advance users). Following are the screens released by cPanel (forums)

 

 

 

Stand Alone Installation of Enkompass on HyperV Part-II (Installation and Configuration of Enkompass)

Filed Under (Cpanel, Enkompass cPanel, Hyper-V, Microsoft Windows) by Milind on 16-09-2011

In my previous Article “Configuration of Microsoft Windows Server 2008” I have explain the components which are requires by Enkompass. Once you done all the configuration you are ready to install Enkompass on your Server.

Installation and Configuration of Enkompass

1) Download the latest version i.e. Enkompass 1 from http://layer1.cpanel.net/

Enkompass 1 300x190 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

2) Run the installer, and follow the instructions to complete the installation. Enkompass will install its prerequisites.

3) Following is the very first screen of Enkompass installer which will tell you about the information components which need to be installed before Enkompass installation. Press next to continue

enkompass 3 300x211 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

4) Enkompass will now start installing Third Party Components like Enkompass Prerequisite files and ASP.NET 2.0 AJAX Extension. Accept the EULA to install these Components.

enkompass 5 251x300 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

 

encompass 6 248x300 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)


en 7 300x118 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)


en 8 300x117 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

5) Once the Third Party installation gets complete Main Enkompass Setup Wizard will start. Press Next to continue

en 9 300x230 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)
6) Accept the EULA and Press Next.

en 10 300x232 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

7) Destination folder:- Select the Folder where you want to install Enkompass.

en 11 300x229 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

8) User Information:- Enkompass need a Domain Administrator Account and if the user you mentioned doesn’t exists Enkompass will create it. Make sure to note down the password.

en 12 300x233 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

9) Admin Contact Information:- Insert Admin Contact Email Address and Pager (optional) and press Next

en 13 300x231 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

10) Server IP:- Insert the Main IP of the Server and press Next to continue

en 14 300x231 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

11) DNS Server:- Enter the Primary DNS for Enkompass; Next to continue

en 15 300x231 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

12) Website Share Path:- Here you will have to mention the path where data of the website will be saved. Just like /home in Linux Cpanel

en 16 300x232 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

13) Folder for Website Data:- Website Data folder stores the data of all the website. I have kept it to default and press next.

en 17 300x231 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

14) Backup Location:- Mention the path where Enkompass will save the backups of all the accounts

en18 300x231 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

15) IIS Share Configuration:- Enkompass setup IIS to use shared configuration. I have created and shared one folder (named iis) on the same server and mentioned \\[IP ADDRESS]\iis in the field.

en 19 300x229 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

16) IIS Encryption Password:- Enkompass creates a password to protect the IIS Shared Configuration file. Make sure to note down the password.

en 20 300x231 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

17) PHP on IIS:- If you want IIS to be configured to host PHP select the option “Configure IIS to host PHP” and Enkompass will configure it for you.

en 21 300x229 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

18) Ready to Install:- Press Next to install

en22 300x232 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

19) Finish:- Enkompass has been installed successfully but make sure to open Server Administrator Interface so you can configure Enkompass.

en 23 300x230 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

20) Once you press finish Enkompass will open on local browser of the server and you will get following Screen

ew2 300x136 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

Here, you will have to mention details of server, Database, Mail Server etc. Once you finished, Enkompass is installed. You can access it using http://[IPaddress]:2086 and after login you will get following screen
final

ew final 300x90 Stand Alone Installation of Enkompass on HyperV Part II (Installation and Configuration of Enkompass)

Thats All…

Follow US

Enter your email address:


I'm listed in Technology

Sponsors

Advertisement

Become Fan

tag cloud