Code Igniter hates my server

May 08 2006

I spent the weekend getting to grips with Code Igniter, the relatively new PHP web-app framework from pMachine (creators of Expression Engine) – and I’ve got to say I’ve never developed an application so fast!

Code Igniter logo

I’d been looking for an excuse to explore the framework since I downloaded it a few weeks ago, so when some back-end development for Bite Size Standards came up, it was the perfect opportunity to see how easy CI was to use.

While I’ve never used an M-V-C (Model-View-Controller) framework before, the concept was fairly easy to understand, and within a few hours I’d built a simple application that would easily have taken a couple of days if I’d been writing all the PHP myself. CI provides a lot of built-in features that would normally need a fair bit of thought – things like pagination through result sets, form validation and clean URLs – and also automagically handles cross-site-scripting, something I usually forget to think about when hand-rolling an app myself.

Among PHP developers there has been a lot of talk about the various frameworks recently, with many recommending the Zend Framework as the best of the bunch, but I found that for documentation the Zend offering is really lacking. CI, by comparison, shines when it comes to the user guide; every class and helper is explained in straightforward language with easy-to-understand examples.

We were getting along so nicely…

So after a few short hours I had my application all ready to go, and copied it to my dev server. Unfortunately, it was at this point that it all fell to pieces – all I could get were obscure errors, apparently related to the database connection class. I’ve posted in the CI Forums, so hopefully it will turn out to be a stupid error and easily fixable; if anyone else has experience of this happening, please let me know how you fixed it!

Filed under: PHP.

Technorati tags:

Digg this article

Bookmark this article with del.icio.us

Previously: Movie illiterate

Next: Code Igniter redux - I'm an idiot


Comments

Sam Kellett
787 days ago
Looks very interesting, I’m planning to build a sizable web application in the very near future so I gave Rails a chance, however, me being a devoted PHP guy I couldn’t love Rails enough to rely on it. CI looks like a solution, I’ll deffinetly have to experiment wth this.
#1
Matthew Pennell
787 days ago
I thought about getting into Rails, but I just feel like I’m at capacity when it comes to learning new languages, so CI offered the opportunity to get Rails-like efficiency with a language I was already comfortable using.

I’d definitely recommend watching the demo videos – they show really simply how easy it is to get started.
#2
Yannick
783 days ago
I have been using CI also. I don’t remember having any probs when I wrote my first little app and switched it over to the server here at work. All I simply had to do was just change my database connection information, such as database name, username and password and I was pretty much good to go. Oh right and I also had to change my base_url in my config.php file
#3
Zach
783 days ago
Its amazing how similar to Rails this is, but perfect for PHP people. From watching the demos, it seems like Rails comes out a little more elegant, but that’s probably due to Ruby being nicer looking than PHP (in my opinion).

Regardless, its really nice to see more and more frameworks popping up to make web-app development easier for whoever in whatever language they’re most comfortable.

Good luck with the project.
#4