How To get php5-mcrypt enabled / php5-mcrypt installed but not working Ubuntu 14.04

Hi! Yes this blog is alive, and the author is alive too.

Recently while dealing with some encryption code in php, I faced this problem – I had checked out code that a colleague had written and was making some changes.  While running it, the code wouldn’t work as long as the encryption part of the code was included.  Comment it out and the rest of the pieces were working fine. And digging deeper, I realized that probably, encryption modules where not installed yet – because the code was failing exactly at

 mcrypt_module_open(MCRYPT_RIJNDAEL_128, ”,’cbc’, ”);

I did the following to fix this:-

Environment – Ubuntu 14.04 – Nginx+php5-fpm with Nginx connecting to php5-fpm via unix socket

With a little help from Ubuntu Forums – Ran this command

 dpkg –get-selections | grep php

And got this as the output –

php5-common install
php5-curl install
php5-fpm install
php5-json install
php5-mysql install

 This command lists the modules/libraries installed in our systems – and this clearly showed that the php5-mcrypt module was not even present.

I did

sudo apt-get install php5-mcrypt

and after the installation,

sudo service php5-fpm restart

But this still dint work. Finally the fix mentioned in this link worked for me –

and a sudo service php5-fpm restart

And it finally worked.

Posted in How To..., Uncategorized | Tagged ,

Linklog – Low level Parsing,Lexing Grammars

Found this via @ravi_mohan today – He was trying to find books/articles on low level lexing and parsing of grammars and found this from his network – Seems to be worth reading – But currently I am unable to do so – Looking for inputs from people already done so.

Link is – Parsing Expression Grammars

Posted in linklog

Linklog – Personal Hadoop Sandbox cluster by Hortonworks

Found link this via a sponsored/promoted tweet on twitter today –
Right now, I am not able to take this for a test ride. Looking forward to inputs on how good this is to get one’s hands dirty with Hadoop in general.

Go ahead and comment away! 🙂

Posted in linklog, What is.. | Tagged ,

Blending Features in Canvas HTML5

Reblogging this from Adobe website as a means to easily find the link again –

Summary of the post – Adobe has added some specs to the canvas api which will improve the way colors and backgrounds get blended. This is in addition to the blending capabilities provided by CSS(3)

For detailed understanding, click away –

Posted in How To..., linklog

BookNotes – Chapter1 Using Memcached by Josef Finsel

Shring key takeaways from the first chapter of the Using memcached throu this blog post. Purpose is for me to recapitulate my learning and for you to get the highlights.

Before starting to read is book, I would recommend readin the following links – these will refresh the memory with the scope and context of words like  events and servers: –

The key takeaways are –
1. Memcached is a NameValue Pair cache only and NOT a persistent data store of any sort.
2. The max size of Name/key is 250 chars, max size of values that can be stored is 1 MB.
3. Can be installed on both linux/unix and Windows servers.
Running the server under Windows as a service only allows one one instance. If you want to run multiple instances you will need to actually run memcached multiple times with different port addresses. This can be done by adding keys to the Registry or by using a tool such as AutoRuns[1] to do that for you.
4. 4 commands for add, update and remove data, and a detailed statistics command
5. Works on a server client basis, so for raw interactions with a trial memcached sever use telnet as a client

That, in short, is the highlights of this chapter.

For detailed reading head to

Posted in BookNotes | Tagged

What is Celery task queue, where do i use it and how do I use it?

As you start going beyond the landing page and the login/logout screen of the latest coolest app that you are building, you realize that the app needs to do a lot more set of things other than querying the database and building dandy HTML views around it. 🙂   And that is when you realize the need for an assistant of sorts, to whom you can throw all the extra load and continue working on your html views 🙂

This is where Celery the task queue comes into the picture. The Celery homepage and the associated Wikipedia page will only say this much –

Celery is an asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well.

But where the hell do I use it? What are typical usecases where Celery comes into the picture? So instead of writing a blogpost all over again, sharing this slide share link, that I found particularly useful in answering these questions that bogged me –

And this one with a little more technical details as to how the tasks are dealt with

So click through the above and get enlightened. And share your experience in the trenches with Celery.

Posted in library watch, What is.. | Tagged , | 2 Comments

Bridging the learning curve to Backbone.js

Sharing a URL which talks about how to move from JQuery programming to Backbone style. – i.e. converting an existing codebase into a Backbone based app –

Posted in How To..., linklog | Tagged