Friday, May 31, 2013

PHP + Unicode -> Good articles

Unicode in general :

Tuesday, May 28, 2013

hhvm + wordpress

Saturday, May 18, 2013

Using Hiphop for PHP static analysis

1. Install hiphop on Ubuntu ( I just got an AWS EC2 instance) following these steps :

2. Then run the hiphop command for static code analysis :
hhvm --hphp --target hhbc --input-list /tmp/files.list --output-file hhvm.hhbc.sq3

Building hiphop php on Centos 6.3(Didn't succeed)

I tried to follow the instructions here :
There were few things missing, which I am mentioning here.

1. Path of the third party patches has changed in the hiphop repo. So, find the correct path and then proceed. For me it was :

    cp /home/ec2-user/hiphop/hiphop-php/hphp/third_party/libevent-1.4.14.fb-changes.diff .
     cp /home/ec2-user/hiphop/hiphop-php/hphp/third_party/libcurl.fb-changes.diff .

2. The version/location of tbb has changed.
Get it from :  wget

3. Before doing cmake .
A. yum install subversion
B. install google glog
D. yum install elfutils-libelf-devel
E. get libdwarf
 git clone git://
cd libdwarf/libdwarf
sudo cp libdwarf.a /usr/lib64/
sudo cp libdwarf.h /usr/include/
sudo cp dwarf.h /usr/include/
cd ../..

4. Now you do cmake . and then make. You may get an error saying that lock_guard is not a member of boost. So you need to replace boost::lock_guard with std::lock_guard in ThreadLocalDetail.h.

5. Now do make again. I got some errors which were beyond me - so giving up.

Saturday, May 4, 2013

Set up hadoop cluster on EC2

I followed :

There are few things missing here and there but it's a great help otherwise.

Here are the missing parts :

1. Get the EC2 command line tools :  wget
Your EC2_HOME will point to the place where the above file will be unzipped.

2. Here are all the lines you will put in your ~/.bash_profile :

export AWS_SECRET_ACCESS_KEY=n+v7BZhFy5CwUqpC27C/q8/vJiz5+vy0YH4Z8yyV
export EC2_PRIVATE_KEY=/mnt/aws/aws-pk.pem
export EC2_CERT=/mnt/aws/aws-cert.pem
export EC2_HOME=/mnt/aws/ec2-api-tools-
export JAVA_HOME=/usr

3. After you launch your ubuntu instance - you need to go to AWS console and the corresponding security group - add rule for SSH - so that you can login to the box.

4. On the ubuntu box : put these 2 lines in .bashrc :
export AWS_SECRET_ACCESS_KEY=n+v7BZhFy5CwUqpC27C/q8/vJiz5+vy0YH4Z8yyV

5. Here is your file for whirr :
whirr.instance-templates=6 noop

Blog Archive