Category Archives: Drupal

Non-zero length redirects in Drupal

Drupal logoThose of you hosting Drupal sites on Acquia might come across this issue: enabling compressed cached pages leads to Varnish errors instead of redirects. As explained by Acquia support, this happens because Varnish tries to unzip zero-length response – and, naturally, then fails. Your options for solutions are to purchase a dedicated balancer configuration – or make the response non-zero (for instance, add the “Redirecting…” text into the body).

Continue reading

Using WebSocket with Drupal

Drupal TipsDrupal is written with PHP – a language that has quite a few limitations: request-response logic, one thread per request, no shared-in-memory variables between requests, among other strictures. PHP is easy and fine when you only need to render HTML pages, but what if you want to add real-time applications like chat, streaming analytics, or document collaboration? For these, a better approach is to use the WebSocket protocol. Languages like Java or C++ support this protocol in their core, but not PHP. If we want to develop real-time applications, can a Drupal website avoid writing some part with Java or C++ or using third-party products like Google Cloud Messaging (GCM)? The answer is yes.

Continue reading

Keeping your blocks straight

Drupal TipsDrupal 7 projects utilizing Contexts for placing blocks tend to grow quickly and have many, many different contexts – it can get really confusing! Utilizing a smart naming convention (like Phase 2’s) is an absolute must. But if you’re on a project with several developers, even a coherently, clearly named context structure can still cause headaches; you might still have to search and open up contexts one-by-one in order to locate a specific block.

For those of you using the Devel module, here’s a great way to increase efficiency and speed things up! Just use the following code snippet:

You can place this snippet anywhere in your code or go to to run it from there. In fact, you can use this snippet to search for all sorts of reactions – just modify the filtering options!

Storing sessions with Drupal

Drupal logoWhen developing a Web app with PHP, especially when using a framework or a CMS, most often you just don’t care about sessions. Less frequently, you store and access some information from a session, accessing it via language constructs (like “singleton” object (e.g. ZendSession  in Zend framework), some special wrapper functions or just $_SESSION  global). More often, though, you don’t bother monitoring how and where sessions are stored. But sometimes you should.

The basic purpose of this post is to talk about how, when developing a high-load website, to allow users to log on and access some personalized information. When you have hundreds of thousands hits per day, you should expect that tens of thousands users will log in to their respective accounts. That’s when you need to start caring about session storage. Continue reading

Drupal developers needed now!

DrupalIf you have excellent front-end Web development skills – HTML5/CSS3, JavaScript –  along with a couple of years of experience building sites with Drupal 7, we need you now! We have immediate, full-time opportunities in New York City for Drupal coders looking to join an established team of passionate, open-source-centric engineers. It’s all about smart solutions to problems as they arise…

To apply, please email your resumé to today!