Setup a local configuration file in Codeigniter

Even if you have twenty local environments on //one freaking computer//, this technique still works :)After four years of development, I’m still a big CodeIgniter fan, although some other frameworks are starting to look mighty interesting.  Despite the bugs in Version 2.0.2, however, CI is heading in the right direction.

One CI-related issue that has caused problems for my workplace in the past has been the ability to setup distributed development environments.  Everybody has a different local setup, and some of the configuration directives inside of CI’s application/config folder must change from machine to machine.

Of course, we can’t just tell Mercurial to ignore that folder during commits, because there are some configuration directives that should remain the same across all environments, such as language, charset, enable_hooks, etc.

So, how to make some configuration settings consistent across different computers, and how to make some local settings?
Read more

CodeIgniter Preflight Checker

preflight_checkIn my last post, I discussed do’s and don’ts for making a PHP application portable. This week, I will show you how to create a preflight checker in the CodeIgniter PHP framework to ensure that an environment will support your application.

Read more

Making PHP Applications Portable

portable_computer_guy“Portable” means that your application is able to run on any PHP webserver with minimal fuss.

Ensuring portability is an absolute must for programs that are packaged and distributed for public consumption, like WordPress or MediaWiki.  But, you should aim for portability in all of your applications.  The ideal is a one or two-step installation process and only two or three system requirements:  1. Webserver (IIS/Apache/etc), 2. PHP v5.X+, 3. MySQL 4+.

Read more

Better Tag Cloud