Category Archives: Uncategorized

AWS Summit London 2019

Yesterday I had the chance to attend AWS summit London with some of my colleagues at Zava.

We have become more of an aws shop recently, after moving the majority of our infrastructure to the cloud.

Besides attending the sessions, and touring around to check the booths, and enjoy the freebies AWS gives for the certified engineers. I have also shot for the ML workshop as I did back in December in the AWS builders day 2018

The first session was titled “IOT and Alexa in connected homes
The interesting part for me in it was how you can use Alexa to interact with your users to extract specific information that you can use in your workflow, like order placement, or online help.
They also showcased a study about how Lancaster university implemented a voice-enabled service for the students in 120 days with awesome features.
Some slides documenting their journey can be found here

The second session was titled “Build data driven high performance internet-scale applications with aws databases
It was database architecture strategies and best practices for building high-performance and internet-scale applications using Amazon DynamoDB, Amazon Timestream, and Amazon ElastiCache.
They also showcased how the Guardian moved away from MongoDB after more than one production downtime, to RDS PostgresSQL

One of the slides that helps with your DB architecture decisions

The third session I attended was “Modern application architecture
That one was purely a marketing session showing more AWS tools, and motivations to use them in your architecture. they also showcased how they implemented many tools with Sage, specifically the CI/CD process.

After the sessions, I attended the “Using AI/ML to Personalize your Recommendations” workshop for about 2 hours, which wasn’t enough to train all the models and create all the solutions campaigns.
I got to use the AWS personalize which is still in preview, and I see how much manual work it saved when I did similar examples back in December.
You can find the full workshop guide here
But you can’t implement it until the service becomes generally available.
At night I checked the status for the training/campaigns creation and was happy that it worked without unexpected issues.
You can see a demo of the app we built here

All the AWS summit 2019 slides are available at this link

Drupal and CiviCRM secure cloud installation on AWS with SSL certificate

This is a detailed guide that will show you how to perform a Drupal and CiviCRM secure cloud installation with SSL certificate using

We will be using AWS for our infrastructure setup.

The guide will be broken down into 5 main articles, That I will be posting in the next few weeks

Infrastructure Setup
Web server Configuration
Drupal Configuration
CiviCRM Configuration
Backup Configuration

I aim to keep these articles updated, so If you have any feedback, or a better way to do any of the steps. Please feel free to comment.

Getting Wireless to work on Lenovo Thinkpad T400 with Ubuntu 10.4 Lucid

I struggled for a while to get my wireless card work after installing / upgrading Ubuntu on my T400 Thinkpad.

My T400 came with wireless card : Realtek Semiconductor .

To get it working, I followed these steps :

1- Open nautilus

sudo nautilus

2- Browse to /lib/modules/

3- Search for any rtl8192se and remove them

4-Download the drivers from Realtek website (Search for RTL8192SE)
Click to go to Realtek Website

5- Install the drivers

sudo apt-get install build-essential linux-source-2.6.32
tar -xzvf rtl8192se_linux_2.6.0015.0127.2010.tar.gz
cd rtl8192se_linux_2.6.0015.0127.2010
sudo make
sudo su
make install
modprobe r8192se_pci

6- Reboot and it should be working out of the box.

Why using PHP ?

PHP is one of the most popular server side scripting languages running today. It is used for creating dynamic WebPages that interact with the user offering customized information. PHP offers many advantages; it is fast, stable, secure, easy to use and open source (free).

Rasmus Lerdorf wrote the first PHP (first called Personal Home Page) scripts as a series of Perl scripts that he used to track visitors to his webpage and to see who was viewing his resume. He eventually rewrote PHP as a scripting engine and added support for forms. PHP has been evolving since 1994 as an open source code. A community of followers and developers formed and began using and further developing PHP. Over the years the Personal Home Page acronym was dropped and it evolved into the PHP Hypertext Preprocessor.

PHP code is inserted directly into the HTML that makes up a website. When a visitor comes to the website, the code is executed. Because PHP is a server side technology, the user does not need any special browser or plug-ins to see the PHP in action.

The beauty of PHP lies in its simplicity. It is easy to understand and learn, especially for those with backgrounds in programming such as C, JavaScript and HTML. The language is similar to C and Perl so that anyone with a background in either C or Perl programming will feel comfortable using and understanding PHP. PHP also runs on just about every platform including most UNIX, Macs and Windows versions.

PHP doesn’t use a lot of the system resources so it runs fast and doesn’t tend to slow other processes down. It is typically used as an Apache module, written in C, so it loads and executes quickly. It works well with other software and can be quite fast. PHP is also stable and since it is open source, the PHP community works together to fix any bugs. The community offers technical support and continuously updates the code further expanding PHP’s capabilities.

PHP offers many levels of security to prevent malicious attacks.

Another key advantage of PHP is its connective abilities. PHP uses a modular system of extensions to interface with a variety of libraries such as graphics, XML, encryption, etc. In addition, programmers can extend PHP by writing their own extensions and compiling them into the executable or they can create their own executable and load it using PHP’s dynamic loading mechanism.

In addition to extensions, PHP has tons of server interfaces, database interfaces and other modules available. Of the server interfaces, PHP can load into Apache, Microsoft IIS, Roxen, THTTPD and AOLserver. It can also be run as a CGI module. Database interfaces are available for MySQL, Microsoft MS SQL, Informix, Oracle and plenty of others. If a database is not supported, ODBC is an option.

The main PHP source repository is loaded with modules and interfaces that users have written and contributed. There you can find modules for flash movies, PDF files, calendars and more.

A huge advantage that PHP offers is its community. Since PHP is an open source project, the PHP community is willing to share.

PHP is the best choice for developing WebPages & Intranet applications, it is compatible with any database, and web servers, and integrates well across many platforms and with various software

Below is a diagram from comparing between PHP &

For the above reasons this is why i choose and recommend for you PHP as its primary language for Web Space & Intranet Applications.

Links: – The official PHP website – The PHP Company – Zend framework –  Zend Conference Official website

Smart Debugging with Zend Framework

Sometimes your clients report to you Errors you have never experienced while testing your web application, or broken links, or some errors that occurs under some scenarios that you didn’t apply.

There is a smart trick i do in the ErrorController in my Zend Framework applications, i make the application send me the same error it displays to the user direct to my email, so i can know under what circumstances and conditions that error occurred.

The sweet thing is that when google bot or any search engine crawls my websites, they find some errors also, errors that i and the client didn’t reach, so i get the chance to fix it before any body see it.

I also sometimes disable viewing the error message and display “Some errors has occurred and the support has been notified, sorry for the inconvenience” and provide a link to go to Homepage for example.

Below is the code i have in my ErrorController :

    $errors = $this->_getParam('error_handler');
        switch ($errors->type) {
            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
                // 404 error -- controller or action not found                
                $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');
                $this->view->title = 'HTTP/1.1 404 Not Found';
                // application error; display error page, but don't change                
                // status code
                $this->view->title = 'Application Error';
        $body = 'HTTP/1.1 404 Not Found' . "
"; $body .= $errors->exception . "
"; $body .= "IP Address: " . $_SERVER['REMOTE_ADDR'] . "
"; $body .= "User Agent: " . $_SERVER['HTTP_USER_AGENT'] . "
"; $body .= "Lang: " . $_SERVER['HTTP_ACCEPT_LANGUAGE'] . "
"; $body .= "Referer Link: " . $_SERVER['HTTP_REFERER'] . "
"; $body .= "Requested URL" . $_SERVER['REQUEST_URI'] . "
"; $mail = new Zend_Mail(); $mail->setBodyHtml($body); $mail->setFrom('', 'Website Support'); $mail->addTo("", "Ahmed Abdel-ALiem"); $mail->setSubject('Sitename Error Occurred'); $mail->send(); $this->view->message = $errors->exception;