CodeIgniter setup tips

  • Fix mod_rewrite to have clean URLs, and get rid of “index.php” part.
  • Edit “config/config.php” and change the following:

    // Setup your base URL
    // No need for index.php
    $config['index_page'] = "";
    // Remove AUTO and Put PATH_INFO
    // this will allows you to pass variables as URL
    // segments or Query string "?id=1"
    $config['uri_protocol'] = "PATH_INFO";
  • Setup your database configuration “config/database.php”
  • Auto connect to database, edit “config/autoload.php”:
    $autoload['libraries'] = array('database');
  • Edit “config/routes.php” to change default controller:
    $route['default_controller'] = "users";

CodeIgniter yet another PHP framework


For the last year I spent a lot of my PHP time playing with CakePHP I like it at first, but when I tried to build large applications with it I noticed it have major issues with performance, plus I really had difficult time dealing with it is strict naming convention and it object-relational-mapping (ORM).

Few days ago I read about CodeIgniter framework and its similarities to CakePHP and its amazing performance, so I went and visited their website again, I heard about CodeIgniter before from Abdullah Aldosari (I miss our technical discussions) but when I visited the website I wasn’t really impressed, but the new website looks much better, so judging by the look improvement alone I decided to give it a try 🙂

My first impressions are good, things I liked about CodeIgniter so far:

  • There is no magic, what you write is what you get, you need to explicitly define what you need.
  • Very fast.
  • You can have directories in your controller,model, or view. I really hated CakePHP flat structure

It is still very early for me to discover its shortcoming, but so far I like.

Learning Drupal

Drupal Logo

Every Eid vacation I end up with an extra free time, I usually use it to learn new stuff, the latest vacation I decided to learn Drupal. Drupal is a Content management system (CMS), it is basically a software to help you manage your content.

Drupal is a modular and customizable CMS, you can use it to build different types of web sites, a Blog, company or organization web site, community website, you name it.

Since last year Abdullah Aldosari start working with Drupal, and as always he started marketing it as the best invention ever, and as always I argued with him that building your own CMS is better, and as always I was wrong 🙂 Drupal is the best invention ever!! okay I am bit exaggerating but please don’t do my mistake, if you are building a new website find your self a CMS and customize it.

Customizing a CMS isn’t that hard, it would be much easier than building everything from scratch, and it will give you many features that you didn’t even think of. Drupal Features

Of course you don’t have to use CMS for every website you build, in many situations it is better to build your own stuff or use a framework instead of CMS. Check Is Drupal right for you to help you decide 🙂 new search engine


After serving the past 3 years, I am replacing Swish-e with Solr search server, Solr is a search server based on Lucene text search engine.


Solr has many advance features I didn’t utilize most of them yet, but hopefully you will see them soon. I will write a post about Solr and how it works and its integrate with PHP soon.

For now please have a look at it and tell me what you think.