Benchmarking / Profiling with XHprof



XHprof great extension that allow us to benchmark and profile our PHP application with very useful information. Also you have to use XHGUI which display rich data in nice way lets move to the installation and configuration steps


Upgrade from Ubuntu 13.04 (Raring Ringtail) to Ubuntu 14.04 (Trusty Tahr)

Below is the steps you need to do to upgrade from Ubuntu 13.04 (Raring Ringtail) to Ubuntu 14.04 (Trusty Tahr)


  • Disable third party ppas
  • If you faced problem on upgrade dictionaries and aspell packages execute the following
  • Enable the 3rd party ppas
  • If you face grub error simply use boot repair and follow the instructions in this link

Hope this can help some one and feel free to ask about anything

Fix skype chat window full screen doesn’t exit

I had an issue on Ubuntu with skype full screen on chat window which prevent me to exit the full screen mod and the fix was

  • Open ~/.Skype/skypeusername/config.xml
  • find the xml-node ConversationsWindow and set it to something else so it would not fill the whole screen.


Vagrant & Puppet using PuPHPet for beginners

During our work we are facing a lot of problems and bugs because our teams working on different environments and this is the root cause of hell of issues which consume a lot of time and effort to fix and it should not appear from the beginning so we need just to unify our development environments and that is why it is and urgent need to work with vagrant


Scalable System Architecture Patterns – Result Cache

Result Cache

In this model, the dispatcher will first lookup if the request has been made before and try to find the previous result to return, in order to save the actual execution otherwise it dispatch the request to one of the worker the same as Load Blancer Pattern then store the result in the cache then return the result to the client .

This pattern is commonly used in large Web Application and enterprise application. Memcached / Redis is a very commonly deployed cache server.

Result Cache


Scalable System Architecture Patterns – Scatter and Gather

Scatter and Gather Pattern

In this model, the broadcaster  multicast the request to all workers of the pool. Each worker will compute a local result and send it back to the Aggregator , who will consolidate them into a single response and then send back to the client.

This pattern is used in Search engines like Yahoo, Google to handle user’s keyword search request … etc.


Scatter and Gather

Scalable System Architecture Patterns – Load Balancer

Since it become mandatory for each developer to know how to scale his application so i decided to write some articles about system scaling and some common architecture patterns.

Load Balancer Pattern


Better PHP performance with Zend OPcache

Zend OpCache provides faster PHP execution through opcode caching and optimization. It improves PHP performance by storing precompiled script bytecode in the shared memory.

Then we need to add the proper configurations to make it work


Deploying PHP Projects with Webistrano

I noticed recently there are many people facing problems in installing and configure Webistrano so i decided to write this article and list the problems you may face with its fixes.

So lets start first we need to install ruby  ruby-dev gem rubygems libmysqlclient15-dev (To avoid mysql native extension compiling errors)


PHP code analysis tools

PHP Code analysis tools

PHP Mess Detector

(PHPMD) is pretty similar to PDepend, and provides reporting for bugs, unused code and overly complex functionality. It’s very useful for identifying spots that could use some refactoring.

Installation via composer