Amazon EC2 micro instances are a great way to test out what cloud servers have to offer and to find your feet in the AWS console. But they are slightly lacking in terms of RAM. 615MB of RAM is enough to test using the console and doing basic things. It will even let you use Apache and serve some basic web pages. But if you want to start doing dynamic web pages or even start doing database driven stuff you might start to run out of memory quickly.
I would never normally recommend the use of FTP on an Internet facing server. Always use something more secure such as SFTP etc. But where needs must, here is a quick guide on how you do it under CentOS/RHEL based instances. The same principle will apply under Debian/Ubuntu based servers, but obviously the commands and config files will differ slightly.
I’ve been working with Django for a recent project but ran into a problem getting it to use my local MAMP MySQL install as a database engine. You would think this would be straight forward but there appears to be a conflict between where Django/Python expect MySQL to live.
This is part 2 of the Laravel plus Openshift Tutorial. Part 1 is here. If you’ve not done so already, have a read of that first you eager beaver you.
At this stage you should have an Openshift account, your public/private key pair installed and you should have git cloned your Openshift application into your webroot.
Good, lets go.
I’ve been playing with a few PaaS providers for a while now but never really found one that offered the features I liked combined with use-ability and tweak-ability. The only one that came close was Zend’s PHP Cloud which I get access to as part of the Zend PHP 5.3 Certification. I believe this is now an open beta if you want to give it a try. The other main contenders, PagodaBox and EngineYard don’t offer the same level of features in their free offerings.
That search for awesomeness ended however, when I discovered Redhat’s Openshift platform.
Here’s a quick coding kata I like. It’s called fizz buzz. It makes you think about solving simple problems in different ways and can usually be solved in under 5 minutes. These little brain teasers are also useful for learning new language basics.
Here are a few solutions in PHP:
During the development lifecycle of your CodeIgniter application you probably move it between several servers using different database settings for each server.
I’ve created a new database.php file which uses the ENVIRONMENT constant to allow different database settings per server.
To use it, add your database settings to each case statement inside of /application/config/database.php. Then when you switch between servers change the environment constant inside of /index.php.
The file is available as a gist here.
Ok on with the show. In this tutorial we will be continuing on from part 1 where we did a very brief tutorial on installing CodeIgniter.
This post will mostly be theory and is intended to cover the anatomy of a CodeIgniter installation and give a brief description of what ties together CodeIgniter.