Red Crackle Blog

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.

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.

Varnish has a bunch of modules providing extra functionality that don't come with standard installation. You can find them on VMODs Directory. To install any of these modules, Varnish and the module have to be compiled from source. Recently we had to install the Cookie module to parse the cookie string and use it for caching. Here are the steps:

Recently we had to install Varnish from source so that we could compile it with some additional modules. Here are the steps to install Varnish 3 from source on Ubuntu 12.04:

1) Clone Varnish source from git.

git clone

2) Change into the cloned directory.

cd Varnish-Cache

3) Checkout branch 3.0 from git and pull the latest content of this branch.

How to put a breakpoint in a dynamically loaded javascript

Using Firebug or Chrome DevTools, It's very easy to put a breakpoint in a JS that is loaded during page load. But if you are loading a JS dynamically after the page load, it's not that simple. Today I learned a nice trick to make it easier to put a breakpoint in such a javascript using Chrome DevTools. Here are the steps:

1) At the bottom of the JS file that is being loaded dynamically, add the following line:

3 Tips To Help Choose The Right CMS Platform

It is difficult to choose the right CMS solution for your business. There are a lot of platforms available out there. And you will have to do a lot of research as part of your homework. This article raises some thought provoking questions on the points to ponder over before choosing the right CMS solution for your business.

Do you really need a CMS? What are the objectives you wish to seek through the CMS? These are some of the pointers discussed in this article. Use this article as a reference to find the right CMS.

5 Fun Facts About Drupal

Drupal has a rich history that dates back to more than a decade. Launched in 2001 by Belgian Dries Buytaert, Drupal was born as a message board. The application then went through a series of life-changing sequences to reach where it has today.A fact that helped Drupal immensely is the decision to make it an open source project. This brought in the involvement of a wide community of developers. Check out the fun facts provided in the article to get to know Drupal better! You will definitely enjoy the facts provided in this fun article!

How To Set Different Page Titles For The Same URL?

In a recent project, we had to implement functionality where the page title changes according to values submitted in the form. Since the page titles in our website was handled using meta tags, the challenge was that even when the form was submitted, the title of the page remained the same with only the query parameters changing.

In this post, I will show you how to add different titles for a page with the same URL.

Ready to get started?REQUEST A QUOTE