Showing posts from 2013

Webmail (Roundcube/Squirrelmail/Horde) is not showing emails

Sometimes you face the issue in which Webmail (Roundcube/Squirrelmail/horde) won't show emails in mail boxes for some particular account(s). Reason: The issue is with the Dovecot and may be due to Dovecot cache. Fix: Follow the steps mentioned below to fix the issue: 1. SSH the server with root access and change the current directory to the mail directory of the affected account using cd command: # cd /home/<user>/mail 2. Run the following script to find the dovecot related files and moved those to backup file. # find -type f -name "dovecot*" -exec mv -f {}{,.bak.`date +%m-%d-%Y`} \; 3. Restart dovecot with the following command: # /etc/init.d/dovecot restart Now check the mails on your Webmail account. The emails will be shown now. :)

Website shows default Apache test page

Issue : The website shows default Apache test page(not the Plesk default page) instead of the website contents. Resolution : 1. Make sure that the domain name resolves to the same IP address on which the domain's hosting is set up in Parallels Plesk Panel. If a mismatch is found, either change the DNS records or re-assign the domain to correct the IP address. 2.  Check if index file is missing from the document root in the server. Probably you don't have an index page, or this page is not listed in the DirectoryIndex directive in the main Apache configuration file (httpd.conf). You can modify DirectoryIndex in httpd.conf to match your needs, e.g.: DirectoryIndex index.html index.htm index.shtml index.php Then restart Apache for the changes to take effect. 3. Try rebuilding Apache configuration files for the domain: /usr/local/psa/admin/bin/httpdmng --reconfigure-domain <domain_name> If the issue occurs for all domains, you may run this command: /usr/loc

Cron of wget command is not working

Error:  /usr/bin/wget: line 1: ////centos/5/x86_64/wget-1.11.4-3.el5_8.2.x86_64/usr/bin/wget: No such file or directory Fix: You need to re-install wget and GET packages with "perl-libwww-perl" in the server in order to fix this issue. You can follow the steps mentioned below to do the same: 1. Login to your server as root. 2. Run the following command: root@server[~]# yum -y reinstall wget perl-libwww-perl 3. Once the above command is executed without any error, the issue should be fixed. Sometimes, you will get the following error while installing the package "perl-libwww-perl": Excluding Packages in global exclude list Finished No Match for argument: perl-libwww Nothing to do In such scenario, you need to install "perl-libwww-perl" using the following command: root@server [~]# yum -y --disableexcludes=all reinstall perl-libwww-perl I believe, the above command will execute successfully and your issue sh

Mamboo CMS – Fatal error: Call to undefined method mosMenu::mosDBTable()

Fatal error: Call to undefined method mosMenu::mosDBTable() in /home/user/public_html/mambo/includes/core.classes.php on line XXX Resolution: 1. Open /include/database.php in an editor 2. Add the given function just after “var $_db = null;” function mosDBTable($table=”, $keyname=’id’, $db=”) { $this->mosDBAbstractRow ($table, $keyname, $db); } 3. Save and upload database.php 4. If you getting any warning now on /includes/Cache/Lite/Function.php Replace $result = call_user_func_array($target, $arguments); with $result = call_user_func_array($target, &$arguments); The issue should be completely fixed now. :)

Cloud terminology

Cloud computing is a type of computing that relies on sharing computing resources(hardware and software) rather than having local servers or personal devices to handle applications. Since cloud hosting is such a technical industry, understanding its terminology can be slightly confusing. I am explaining some fundamental terms you should know when considering cloud hosting for your business. Private Cloud: A cloud computing-like environment within the boundaries of an organization and typically for its exclusive usage. A private cloud is a dedicated, internal server that is exclusively used by one customer. The actual platform and applications, however, continue to be maintained by the cloud provider, so there is no need for an internal IT department.  Public Cloud: A cloud computing environment that is open for use to the general public, whether individuals, corporations or other types of organizations. Amazon Web Services are an example of a public cloud. Hybrid Cloud: A com

CloudLinux with cPanel

As cPanel already announce the partnership with CloudLinux, I am enclosing the benefits of cPanel CloudLinux here. cPanel unified their licensing systems, integrated direct support and made it easy for customers to use cPanel with Cloudlinux. Using cPanel with CloudLinux provides hosting companies and data centers with the only commercially-supported Linux Operating System (OS) optimized for their needs, ensuring spikes in resource usage won’t take down an entire server. Now, CloudLinux can be used in conjunction with cPanel & WHM and other hosting products, making cPanel your single source for all CloudLinux licenses. What makes using cPanel with CloudLinux great? Improved stability by limiting the resources any single user can consume : In shared hosting, the most common reason for downtime is a particular account slowing down other accounts on the server. Using cPanel/WHM with CloudLinux utilizes innovative Lightweight Virtual Environment (LVE) technology, improving the d

Domain Name System

DNS is the world largest distributed database system. It is the component of the Internet which converts human-readable domain names (e.g. into computer-readable IP addresses (e.g. The main purpose of Naming is names are easier to remember than numbers. You won't be able to remember each and every website IP addresses in day to day life while you can easily remember the domain names. The second purpose is, from ancient time, addresses are used to locate objects. It means that when you browse your domain, it direct where to look for your domain info. There are following three components on which DNS is built on: 1. A “name space” : The naming system on which DNS is based is a hierarchical and logical tree structure called the domain name space. 2. Servers making that name space available : Nameservers answer ‘DNS’ queries.  3. Resolvers which query the servers about the name space : Resolvers ask the questions to the DNS system on behalf of

Will cloud computing kill the storage area network?

Deployment of the datacenter has undergone a standard position in the acceptance of the server and storage devices. The companies are moving from purchasing the separate physical servers connected to storage area networks (SANs) to more modular “reference architectures” which is having all the features required to run their applications. Servers and storage systems were sold as different IT infrastructure products in the past, with the different price and sold to different group under different IT departments. But, the migration to the cloud has changed all these exercise. Recently there was a migration by a major server and storage vendor, who enabled their storage to directly connect to its blade servers, which made the storage network unnecessary. All the necessary features that is required to run applications, provided by the modular converged architecture, which is now a simple building block for the datacenter. The storage area network provides only the limited

What is CageFS ?

CageFS is a virtualized file system and a set of tools to contain each user in its own private virtual space. Each customer will have its own fully functional CageFS, with all the system files, tools, etc. With regards to server security, CageFS which works with cloud Linux is an option. The benefits of CageFS are: 1. Only safe binaries are available to user 2. User will not see any other users, and would have no way to detect presence of other users & their user names on the server 3. User will not be able to see server configuration files, such as Apache config files 4. User's will have limited view of /proc file system, and will not be able to see other' users processes 5. CageFS becomes part of CloudLinux OS and there is no additional charge for it 6. Easy to install and configure CageFS CageFS will automatically detect and configure all necessary files for: • cPanel • Plesk • DirectAdmin • ISPmanager • Interworx • MySQL • PostgreSQL • LiteSpe

Why Cloud hosting?

Cloud computing comes into focus only when you think about what hosting always needs: a way to increase capacity or add capabilities on the fly without investing in new infrastructure, training new personnel, or licensing new software. The technology behind Cloud hosting allows us to have a cost effective, reliable and scalable architecture. The processing capacity of the Cloud is unlimited because we can add servers and resources to the Cloud as per our requirement. Lets discuss on some points regarding Cloud hosting: 1. Cost effective : The first reason to choose Cloud is to save money. Cloud Servers are charged by the hour and you will only be billed for the resource you used. The cost of buying individual servers is much higher than virtualization. Even though you may save costs on hardware, the costs of the virtualization software and licensing may be high. You may have to treat each virtual server as a physical instance like before, so normal licensing costs for each virtua

Eximstats Error : cPanel

Sometimes you may encounter with the following error(s) while checking Email Trace option in cPanel: ~~~~~~~~ Could not connect to mysql: Access denied for user 'eximstats'@'localhost' (using password: YES) ~~~~~~~~ Starting eximstats: DBI connect('eximstats:localhost','eximstats',...) failed: Access denied for user: 'eximstats@localhost' (Using password: YES) at /usr/local/cpanel/bin/eximstats line 258 ~~~~~~~~ Fix: The reason behind this error, is an inaccuracy between the eximstats password for cPanel and the real password for the MySQL database. To resolve this, you will need to update the password  for the eximstats user in MySQL using the following steps: 1. Initially check if eximstats is enabled at /var/cpanel/cpanel.config.  2. If yes, you need to get the eximstats password from the file /usr/local/cpanel/etc/eximstats.sql. At the top of the file, u will see like that: REPLACE INTO user (host, user, password) VALUES


KVM, or kernel-based virtual machine, is a full virtualization solution and userspace component for Linux that utilizes hardware virtualization extensions such as Intel's VT to create virtual machines running on a Linux host. KVM is a unique hypervisor. It consists of a loadable kernel module that provides the core virtualization infrastructure and a processor specific module. Using KVM, one can run multiple virtual machines running unmodified Linux or Windows images. Each virtual machine has private virtualized hardware: a network card, disk, graphics adapter, etc.  KVM is a relatively new and simple, yet powerful, virtualization engine, which has found its way into the Linux kernel, giving the Linux kernel native virtualization capabilities. Because KVM uses hardware­based virtualization, it does not require modified guest operating systems, and thus, it can support any platform from within Linux, given that it is deployed on a supported processor. Advantages of KVM Virtua


Xen is a virtualization system supporting both paravirtualization and hardware-assistant full virtualization. Xen is an open-source type-1 or baremetal hypervisor, which makes it possible to run  many instances of an operating system or indeed different operating systems in parallel on a single machine (or host). Xen is the only type-1 hypervisor that is available as open source. Xen is  used as the basis for a number of different commercial and open source applications, such as: server virtualization, Infrastructure as a Service (IaaS), desktop virtualization, security  applications, embedded and hardware appliances.  Some main points on Xen: It named from neXt gENeration virtualization. Xen initially created by University of Cambridge Computer Laboratory. Xen is Open source (Licensed under GPL2). Xen offers high performance and secure architecture. Xen is powered by a growing and active community and a diverse range of products and services. Virtualization in

Database Connection Error

If your hosting has put a limit on simultaneous MySQL connections per account, you will get Database Connection error on your website when your database connections exceed limit on the server. It depends upon your database queries connections hitting to the server. Most sites will work perfectly with a 25 concurrent processes limit. Processes open and close so quickly that they hardly ever overlap. If your website is exceeding the database connection limit, you need to optimize your database (for faster queries). Also, you should check your code to see if you are closing the connections correctly. the connections can also be there because you use pooling, so the system can reuse exist connections. I am pasting some techniques to optimize your database: 1)  long-running process on MySQL Please do a query level optimization to avoid long running queries. i) ii) 2) large or compl

Error: could not open mime types config file

Sometime, httpd service is being stopped in the service due to mime types files. When you will check the logs, you will get the following error: root@server [~]# tail -f /usr/local/apache/logs/error_log [Wed May 08 17:08:25 2013] [error] (2)No such file or directory: could not open mime types config file /usr/local/apache/conf/mime.types. Configuration Failed Fix: In such scenario, you can fix the issue by copying the mime.types files from /etc directory to /etc/httpd/conf/ or /usr/local/apache/conf (In cPanel server). root@server [/etc]# cp -iv mime.types /usr/local/apache/conf/ `mime.types' -> `/usr/local/apache/conf/mime.types' root@server [/etc]# Then start httpd as follows: root@server [/usr/local/apache/conf]# /etc/init.d/httpd start root@server [/usr/local/apache/conf]# The httpd service is started now. :)

Tailwatchd failed error on cPanel

Sometimes you get following email regarding Tailwatch service failed from cPanel.  tailwatchd failed @ Wed Apr 10 16:35:03 2013. A restart was attempted automatically.  Service Check Method: [check command] tailwatchd is not running If you check Tailwatch logs, you will see the following logs: Cpanel::TailWatch::Eximstats appears to have unprocessed SQL in /var/cpanel/sql/eximstats.sql. Fix: When mysql is unable to execute a query they are logged for processing later. Eventually these SQL files may be handled automatically and this message will not appear.  In order to fix the issue in the meantime, you can execute the following queries as root with something like this: # mv /var/cpanel/sql/eximstats.sql /var/cpanel/sql/eximstats.sql.tmp_working_copy # /scripts/restartsrv_tailwatchd # mysql eximstats < /var/cpanel/sql/eximstats.sql.tmp_working_copy Once you are sure all is well, you can remove /var/cpanel/sql/eximstats.sql.tmp_working_copy. Thank you.

Increase /tmp partition size in cPanel

Sometimes /tmp partition can get overfilled, so no new information can be recorded. In such scenario, you need to increase the /tmp partition size. You can increase the /tmp size using the following steps: 1. Stop cPanel, Apache (litespeed) and MySQL services using following commands: # /etc/init.d/cpanel stop # /etc/init.d/httpd stop # /etc/init.d/lsws stop # /etc/init.d/mysql stop 2. Umount /tmp and /var/tmp: # umount -l /tmp # umount -l /var/tmp 3. Move /usr/tmpDSK file to another location: # mv /usr/tmpDSK /usr/tmpDSK_bak 4. Modify /scripts/securetmp to set tmpdsksize to desired size: # vi /scripts/securetmp   $tmpdsksize = 2048000 5. Run: # /scripts/securetmp 6. Start cPanel, Apache (litespeed), MySQL services: # /etc/init.d/cpanel start # /etc/init.d/httpd start # /etc/init.d/lsws start # /etc/init.d/mysql start Thats it. Your /tmp partition saze has increased. :)

PostFix Mail issue

Bounce back message : This is the mail system at host I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to postmaster. If you do so, please include this problem report. You can delete your own text from the attached returned message. <>: User unknown in virtual alias table Final-Recipient: rfc822; Original-Recipient: rfc822; Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; User unknown in virtual alias table ======== FIX ======== The issue occurred due to the server hostname, if you are hosting the domain in plesk the same name should not be included as the hostname. # cat /etc/hostname # vi /etc/postfix/ ********************* Incorrect line #mydestination =,, localhost, localhost.loca

Install Perl modules in cPanel server

While installing the Perl modules in cPanel, you might get the following error: Checking C compiler....Could not locate an executable "cc" binary....Done  ** Unrecoverable Error ** The C compiler is not functional and auto repair failed. Perl module installs require a working C compiler. Please repair the C compiler and try again. To overcome this situation and install Perl modules like " Net::SMTP::TLS ", you need to install it manually in the server. Please follow the steps mentioned below: Step 1 . First export the following (replace username with the actual user): export PERL_MB_OPT='--install_base /home/username/perl5' export PERL_MM_OPT='INSTALL_BASE=/home/username/perl5' export PERL5LIB='/home/username/perl5/lib/perl5/i386-linux:/home/username/perl5/lib/perl5' export PATH="/home/username/perl5/bin:$PATH" Step 2 .  Then add the above lines mentioned in Step 1 to the /home/username/.bashrc Step 3 .  Download th

Configure and Enable GZIP Compression with mod_deflate in cPanel server

One way to improve the serving speed of web pages is to enable GZIP compression to compress the size of web pages been transferred. Compression, which results in reduced web page size, also has added benefit of saving bandwidth. With all the benefits of GZIP compression, it effectively offsets the performance penalty on server load caused by the compression activity. Note that Apache 1.3 uses mod_gzip, while Apache 2.x (2.0 and 2.2) uses mod_deflate. The guide focuses on Apache 2.x with mod_deflate to turn on GZIP support. Step 1#   Compiling Apache with mod_deflate Module Note: The step can be skipped if mod_deflate has already been compiled into Apache. To verify, run httpd -t -D DUMP_MODULES command on the server, and look for deflate_module (static). Login to cPanel WHM (WebHost Manager), and run EasyApache (Apache Update) under Software section. Select radio button of Previously Saved Config , and click on Start customizing based on profile button. Do whatever c

Failing to start MySQL

Sometimes you get the following error while starting the MySQL service or when upgrading to mysql5. Error MySQL Couldn't find MySQL manager or server Solution Comment this line from /etc/my.cnf Basedir =/ var / lib / mysql Thank you.

Move Tmp To Ramfs/Tmpfs

This article will show you how to create a ramfs/tmpfs partition and how to change the tmpdir variable to quicken copy to tmp queries. Keep in mind this only speeds up the IO portion of maintaining multiple indexed result sets due to query structure, the best performance increase would be gained from query analysis. ramfs vs tmpfs RamFS will use up all of your memory regardless of the size you set and it also never uses swap. TmpFS will use up only what you have assigned to it and it will use swap for idle ram. Typically you will want to use tmpfs, but its important to know the differences. Creating a ram partition You need to create a new mount to go about doing this. The below will create a 100mb tmpfs ( ram based ) partition and mount it. # mkdir /tmpfs # mount -t tmpfs -o size=100m tmpfs /tmpfs/ Thank you.

Repair a database

To repair a database using the default MyISAM  storage engine use: # mysqlcheck  -r  databasename If the above command fails to repair a myisam table, you can attempt to use the following repair command for rebuilding table structures from .frm files in the event .MYI headers are missing or corrupt: # mysqlcheck  -r  --use-frm  databasename To repair all databases on a server: # mysqlcheck  --repair  --all-databases

Hacking: how to prevent

Hacking can be done in many different ways. Two commonly used methods are explained below. (i) Account passwords harvesting ====================== In this method, hackers will try to collect website account passwords in large scale. We will call this process "account passwords harvesting". Details on how they do that are fuzzy. Use of password like 123456 or use of a spyware infected PCs at home are the main reasons. Actually the complexity of the password should be beefed up to at least 8 characters. But this does not help if the user computer is infected with a keylogger. (ii) PHP vulnerabilities ====================== PHP has got of lot of very vulnerable and potentially exploitable functions. Hackers have been enjoying these security lapses for a long time. Most of the PHP applications like Joomla, PhpBB, PhpNuke etc. are community developed. These application may have potential security vulnerabilities and hackers may exploit them. Most of the website hacki