Follow our blog to learn more about the exciting world of Drupal!

How to detect which module creates a session cookie

A good number of Drupal sites use front-end Varnish proxy to ensure pages load faster. The most commonly used Varnish configuration caches pages for anonymous users and lets requests with cookies pass through to the backend.

At times, a contributed module updates the $_SESSION variable, setting up the session cookie even for anonymous users. This increases page load times. You have probably encountered this problem several times. To fix this problem, you need to know which module is updating the $_SESSION variable. Sometimes this is not immediately clear. This article will detect the module that is updating $_SESSION.

How to install and configure GlusterFS Server on Ubuntu

GlusterFS is a distributed file system that allows you to launch a single storage volume that spans multiple disks and machines. This open source application was acquired by Red Hat in 2011 and has gained in reputation as a powerful and reliable tool.

In this article, we explain how to install and configure GlusterFS on 3 Ubuntu servers. A replicated volume is created in the example so that if a file is stored on one machine, it gets replicated to all other nodes in the cluster. Sounds interesting? By the end of this article, you will be familiar with GlusterFS installation and configuration.

How to kill an unresponsive process in Unix

In Windows, it is easy to resolve a hanged system. All you have to do is press CTL+ALT+DEL. And voila! the Task Manager pops up. Everything is simple through attractive UI. But here is a question many people ask – "What should be done while facing a similar situation in Unix?. This article tackles this question.

It's a fact that a lot of users get confused while handling hanged systems in UNIX. This article helps users deal with the situation in a couple of simple steps. And of course, we use the command prompt to resolve the issue! This is done by determining the PID of the hung process and eventually killing it.

How to use Drupal 7 with MySQL master-slave setup

MySQL's replication capabilities allow a database server (also known as a master server) to be replicated on multiple database servers (also known as slave servers). This article will show how Drupal 7 works with MySQL master-slave setup. This is achieved by configuring Drupal's settings.php.

Follow the article to provide details of the MySQL master (such as database name, user name and password). After this, the code provided in the article is used to configure the slaves. By the time you are done with this article, you will be able to perform a MySQL master slave setup with Drupal by yourself!

Drupal vs. WordPress vs. Joomla: A Friendly Comparison

A popular question is tackled in this article. Which CMS is the right choice for your business? Is it Drupal, WordPress or Joomla? This article provides an unbiased look into determining the best CMS solution for your business.

The article also features a couple of websites powered by each of these CMS sites. Go through the article and choose your CMS carefully. In case you wish to provide insights on the topic, you can do so by providing feedback in the comments box.

How to set up Percona XtraDB Cluster on Ubuntu

This article is targeted at those who have worked with Percona XtraDB Cluster installation on Ubuntu.

Rather than setting up MySQL in master-slave mode, it is always advisable to use Percona XtraDB Cluster with a minimum 3 servers so that MySQL can be used efficiently in high-availability, multi-master mode. This ensures that the application will continue to read and write to the MySQL database even if any of the nodes go down.

This article demonstrates the steps to install Percona XtraDB Cluster 5.6 on Ubuntu 12.04. The article goes through the process on a step-by-step basis. Use the code provided to achieve results.

How to connect to GlusterFS from a client machine

This article is for those users who already have GlusterFS server installed. In the article, we demonstrate how to connect to GlusterFS server from a client.

The example shown in the article first installs GlusterFS native client 3.5.2 on Ubuntu 12.04. After this, a series of command line prompts are executed to connect to the GlusterFS server from a client. Add GlusterFS PPA and install its client library. A directory will also be created on the client machine from where GlusterFS will be mounted.

Don't forget to replace parameter names with local ones While using the code provided in the article.

How to change location where MySQL stores data on disk

Most developers who install MySQL via apt-get on Ubuntu will know that it comes with pre-defined settings. The directory where MySQL stores its data is one such setting. The default location is /var/lib/mysql.

There are times when this location will have to be changed. But a lot of developers face difficulty in this regard. This article will guide you through the process.

Use the command line prompts provided in the article to arrive at desired results. After you have completed the steps mentioned in this article, make sure you restart MySQL. And voila, MySQL will use the new directory specified by you to store data.

(Solved) Search API DB doesn't order results by relevance correctly

The Search API DB is a popular alternative to Solr. It works with a normal database to index data. This article tackles a Search API DB issue wherein a search for a keyword that appears on multiple nodes returns results in the wrong order of relevance.

The main issue was discovered to be with search_api_db/service.inc, which generated a wrong query. Since the query wasn't grouping the result by field name, the solution was to add a group by condition on the field name. This resolved the issue efficiently. A patch already exists for this issue on Drupal.org, the link to which is provided in the article.

How to cache pages by role in Varnish

Varnish is generally used to cache pages for anonymous users. It is also used to cache pages by role. At Red Crackle, we deploy Varnish to cache pages by role for corporate sites that are exclusively visible only under SSO. This ensures all users are authenticated but there is no user related information present on most of these pages. This article explains how Varnish caches pages and how configuration can be altered to cache pages by role.

The article uses hook_init() to set a cookie that identifies user roles. hook_user_logout() is then used to remove the cookie as soon as the user logs out.