About Me

It's me, Arif N. In this blog I'll write about my adventure related to computer, programming, and anything that I found interesting. I wish you a happy reading.. :D

Archive for February, 2009

Beginilah kerjaan orang pengangguran seperti saya. Kadang duduk manis di depan tv, kadang juga di depan komputer. Kadang, kalau situasi ekstrim, saya duduk di depan komputer sambil mendengarkan tv yang berkoar-koar sendiri di belakang.

Akhir-akhir ini, acara di tv Indonesia pada pagi hari mayoritas adalah acara musik. Isi acaranya hampir sama, ada band yang manggung, ada chart, dan guyonan. Namun kali ini ada yang lain. Di acara Dahsyat, salah satu acara musik di RCTI, kemarin, trio Luna-Olga-Raffi mengatakan bahwa besok (hari ini, red.), mereka akan kedatangan tamu yang super spesial. Ia adalah Hillary Clinton, Menteri Luar Negeri AS. Dalam hati saya penasaran, seperti apa ya kira-kira bila Madame Hillary ada di acara musik seperti ini.

Keesokan harinya (hari ini, red.), saya sebenarnya hampir lupa tentang pengumuman kemarin. Tetapi saya diingatkan oleh mas-mas yang jadi anchor di acara Indonesia This Morning-nya Metro TV (Maaf mas, saya lupa namanya). Beliau mengatakan bahwa Madame Hillary akan datang di acara Dahsyat. Atau kurang lebih begitu yang saya dengar.

Jadi, saya menanti sampai pukul 9. Saya masuk ke dalam situasi ekstrim, duduk manis di depan komputer sambil mendengarkan tv yang berkoar di belakang. Acara pun dimulai. Sejenak saya meninggalkan komputer saya yang tak kalah manis, dan duduk manis di depan tv. Trio presenter sudah mulai membicarakan pertemuan mereka dengan Madame Hillary. Mereka mengatakan bahwa mereka sudah mewawancarai beliau dan mendapatkan beberapa tanda-tangan. Namun, tanda-tanda kedatangannya belum juga muncul. FYI, acara tersebut diadakan di tempat bu Hillary menginap. Jadi sebenarnya, Dahsyat yang mendatangi Madame Hillary. Tapi enggak apalah, toh yang penting saya mendapatkan jawaban atas keingintahuan saya.

Lagu demi lagu kembali berputar. Namun tanda-tanda kemunculan Madame Hillary belum nampak. Saya pun kembali ke depan komputer manis saya. Saya melanjutkan rutinitas di dunia maya, membaca Slashdot & TechCrunch, sambil baca email dan, tentu saja, Facebook. Ketika saya mendengar suara presenter lagi, saya bergegas kembali ke depan tv. Luna mengatakan bahwa wawancara dengan Madame Hillary baru nanti akan ditampilkan mendekati penghujung acara. Ya sudahlah, saya mahfum bahwa itu adalah taktik untuk mendapatkan pemirsa. Saya pun balik lagi ke komputer.

Karena saya kira masih cukup lama, akhirnya saya memutuskan untuk bermain game. Itung-itung untuk membunuh waktu. Permainan baru berjalan sekitar lima menit ketika hal itu terjadi. Layar komputer tiba-tiba gelap. Keramaian suara musik dari tv di belakang mendadak sirna. Seketika saya menyadari bahwa tegangan listrik sudah tiada. Mendadak saya mendengar suara deru mobil dari atas (FYI, rumah saya berada di tanjakan). Ketika saya mengintip, saya melihat mobil PLN sedang parkir. Bapak-bapak petugas tampak sedang memperbaiki tiang listrik di perempatan atas rumah. Hal ini memang pernah terjadi sebelumnya. Dan berdasarkan pengalaman tersebut, ketika bapak-bapak itu pergi, listrik akan menyala kembali. And we’re live happily ever after.

Namun rupanya perkiraan saya itu meleset. Bapak-bapak itu sudah pergi. Mobil sudah tak ada lagi. Namun listrik tak kunjung menyala. Saya pun inisiatif untuk keluar dan melihat meteran listrik di depan rumah. Diam, meteran itu tidak berputar. Pembantu tetangga di depan rumah tiba-tiba berkata pada saya bahwa listrik akan hidup kembali pukul lima sore. Dan akhirnya saya pun kembali masuk ke kamar dan tidur membawa keingintahuan saya ke alam mimpi. TAMAT.

If you see my theme coloured in blue right now, that means you are looking to my first (successful) themes. This themes created by me, and still under-development. For this time being, may be I’ll not release this theme to public. I have no confidence yet. But maybe I’ll do it someday.

Oke, I’ll explain about this theme. The name was Bluw. It was really simple theme, using two columns, consists of one sidebar and content. Maybe there’s some issues, but I’ll fix it in the process.

Any suggestions and comments are welcome…

There was once a public figure in my country said that blogging is activity for people who doesn’t have work to do. You know what?, maybe he’s right. I’ve been working on my class’s aggregator site for just two months, and didn’t get statisfied response from them. Maybe they just busy on their works, and what I’m doing on the aggregator just bugging them. So then, I’ll not forced them to fulfill my childish request anymore. I’ll shut down the site and won’t bug them no more. Anyway thanks for all the support given to me on the past. Hope I’ll see you again.

Ini adalah tulisan pertamaku di blog berbahasa Indonesia ini. Kalau dipikir-pikir, nulis pakai bahasa Inggris itu pegel juga. Jadinya pengen sekali-kali nulis pake bahasa ibuku, Indonesia.

Selamat datang…!!

CodeIgniter (CI) is one of the MVC frameworks available. Unlike legacy PHP technique, This framework use different URI format for sending and receive parameters. For example: if we use usual PHP technique, we will use URI like:

localhost/index.php?id=2

But in CI, the URI would be look like this:

localhost/index.php/welcome/2

Where index.php is the router, welcome is the controller, and 2 is the parameter given to the welcome controller. It’s because of its design pattern, the MVC (Model-View Controller).

After some reads, there were a lot of discussion on removing the “index.php” in CI forum. And I’ve been spending my time just to figure it out. I found some good resources at CodeIgniter Wikis, and after some trial-and-error, finally it works for me. This is how I do it:

  1. I created .htaccess file and put it on my CI installation folder. If you used Windows, you could use Save As… menu from Notepad to create this file.
    My CI installation folder was www/igniter, so I put the .htaccess file on this folder. And this is my .htaccess file:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /igniter
    
    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #‘system’ can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php/$1 [L]
    
    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn’t true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    #This last condition enables access to the images and css folders, and the robots.txt file
    #Submitted by Michael Radlmaier (mradlmaier)
    RewriteCond $1 !^(index\.php|images|robots\.txt|css)
    RewriteRule ^(.*)$ index.php/$1 [L]
    </IfModule>
    
    <IfModule !mod_rewrite.c>
    # If we don’t have mod_rewrite installed, all 404’s
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin
    
    ErrorDocument 404 /index.php
    </IfModule>

    I just copy-paste the code from CI’s Wiki and modified the RewriteBase into my CI installation folder (in my case: igniter)

  2. Then, I opened the system/application/config/config.php file. I modified the $config['index_page'] from
    $config['index_page'] = "index.php";

    into

    $config['index_page'] = '';
  3. I activated mod_rewrite on the Apache. I opened the httpd.conf file and delete the # character in front of:
    LoadModule rewrite_module modules/mod_rewrite.so
  4. I didn’t need to modified the directory section of httpd.conf file. Maybe it had been already configured by the Apache.

And it works for me. The URI now without the index.php segment. I implemented all of the configuration above on Windows using Wamp. I tried it on Linux too, but so far It didn’t work. I’ll tell you later if I make it.