I keep promising I’ll do better on finishing this series, but 3 more months have gone by (so sorry!) — Well, let’s actually make it happen.
So, we’re building a blog in CodeIgniter.
So far, we’ve covered:
Today, we’ll look at getting our config file set up to talk to that database we built.
Go to your site files. Go to system > application > config >

There are two files that we’ll be concentrating on: config.php and database.php
Let’s open up config.php first.
The first order of business is fixing the base url on line 14. In my case, I’ll change it to http://localhost/awesome_ci/ If you’re using MAMP (I wrote a post about getting MAMP up running), then your address will probably look something closer to http://localhost:8888/awesome_ci/ (In either case, make sure you leave that / on the end!)
Next, scroll down to line 220 and look at the Encryption Key. Depending on the type of project you’re working on, you might not need this, but let’s go ahead and set it for fun.
One of the (many) things I love about CodeIgniter, is that they’re code is well documented. Straight from their documentation:
To take maximum advantage of the encryption algorithm, your key should be 32 characters in length (128 bits). The key should be as random a string as you can concoct, with numbers and uppercase and lowercase letters. Your key should not be a simple text string. In order to be cryptographically secure it needs to be as random as possible.
To keep my keys as random as possible, I’ll typically use a generator. A quick google search returned randomkeygen.com. There’s even a section there for CodeIgniter Encryption Keys. Perfect!

Pick one of the 3 options there and copy and paste it into your config file.
That was easy.
Now, let’s look at the database.php file. This is pretty straight forward too. Scroll down to line 40.

The first thing you have to do is set your database host. If you’re developing locally, it will stay “localhost.” However, if you’re building the site online, this might look different. You’ll have to check GoDaddy or MediaTemple or HostGator or whoever’s documentation.
On line 41 and 42, you need to set your username and password. If you’re running MAMP, it will actually tell you all this information on the start screen.

On line 43, you’ll set the name of the database. If you’re following along, in Part 3, we named our databae awesome_ci.
When you’re done, your file should look like this:

I told you it wasn’t anything crazy! Our config file is now up and running.
So you’ll believe me when I say I’ll actually finish this series. Here’s what’s coming up:
So, get excited!
Recently, I’ve experimented with some new web sites that have made my job so much easier.
I had a group of people where we all needed to schedule a conference call. Trying to synchronize all 4 of our schedules proved far more difficult than I expected. This service, however, allows everyone to look at their calendar and mark their availability. At the end, you can see where all your schedules overlap and what time(s) work for everyone.
Once we had the conference call scheduled, we had to find a service that would allow us to actually make the conference call. Lame, maybe, but I just googled free conference call and this was the first result that appeared. It proved to be quite helpful. With my free account, not only does it allow me to schedule a conference call and send out invitations, but it also gives me a number where I can create a conference call on demand. At the end, as the administrator, I’m emailed a report of the call.
I’ve heard Leo Laporte advertise this service for a few years on his podcast. I had never had any experience witht he service until a couple weeks ago. I was on a call with a freelance client on the other side of the country. He sent me a Go to Meeting invite. It was super easy to set up. Before long, I was looking at his computer screen where he could easily explain the project and what he needed.
Last week, I took head shots for my sister and brother-in-law (still weird to say). It’s crazy how photogenic they both are.