Tag Archives: cms


mysqli_connect(): (HY000/2002): Can’t connect to local MySQL server through socket – SugarCRM – cron.php

PHP Warning: mysqli_connect(): (HY000/2002): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) in sugarcrm/include/database/MysqliManager.php on line

We have faced such an error with SugarCRM today. The above error was reporting in error_log file every time the cron.php is executed via cron job. We have taken a closer look and couldn’t find any real reason why it cannot connect via MySQL socket. Everything looks good and every testing via command line were giving good results. What we have checked is for the existence of the socket file ( the errors 2 states it canbot find the sock file ) and whether running the cron as user from command line can return the error. If it is cPanel system, all cron jobs are running in a Jailed shell from version 11.38. Make sure it is disabled, as it can cause this issue. We have find many similar threads in INTERNET, but  could not find any real reason which can cause it. Finally we have decided to go ahead and force it to use TCP connection rather than using MySQL socket file. To do that we have edited config.php and changed the value of db_host_name parameter to “” from “localhost. That fixed the issue and the error is not reporting so far. It may slow down MySQL connection a bit, as using socket file is stated to be the faster method.



WordPress – Some quick notes!

What is WordPress?

WordPress is a well known PHP based CMS with MySQL back-end, mostly used to build blogs. In addition to develop blogs, WordPress is commonly used to develop websites as well. Even though the WordPress is build as a blog software, it is very flexible and we can develop beautiful websites with it. There are millions of WordPress powered websites run in Internet now. It built in plug-in architecture and a template system.


1. Customization :- As WordPress is built and operates based on a template system, it provides lots of opening to customize your web pages.

2. Dashboard :- The dashboard of WordPress is quiet nice and very user friendly. Among the other CMSes available in the market, it is very simple but powerful and can be managed even by a newbie easily.

3. Themes :- We can easily switch WordPress themes. There are thousands of themes available in the market; both free and paid versions. As it is a very popular application, your search for good theme will end up in a good result.

4. Plugins :- Plugin support is another big advantage of WordPress. You can find almost all types of your plugin needs with WordPress. Due to its wide range of user-base, plugin development and maintenance is very active in the community.

Continue reading