Category Archives: MySQL

FreeBSD 7

FreeBSD

FreeBSD 7 is available, many new improvements performance and feature wise, check the announcement.

One of the most impressive improvements is SMP (Symmetric multiprocessing):

Dramatic improvements in performance and SMP scalability shown by various database and other benchmarks, in some cases showing peak performance improvements as high as 350% over FreeBSD 6.X under normal loads and 1500% at high loads. When compared with the best performing Linux kernel (2.6.22 or 2.6.24) performance is 15% better

Update: OnLamp has a nice article about the amazing FreeBSD 7: What’s New in FreeBSD 7.0

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
    $config['base_url']="http://rayed.com/ci/";
    // 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

CodeIgniter

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 :)