web development war stories from the frontlines to the backend

I finally got around to setting up a more sophisticated deployment system for some of my apps. These apps include some built on a custom PHP framework and others that are Python / Django apps. I figured I’d share my experience…
Why is a high-level deployment infrastructure important? Deployment is something that should [...]

Send this to your significant other/parent/relative/friend so, instead of that sweater, you get one of these nuggets of awesome this Christmas.
The Pragmatic Programmer: From Journeyman to Master
Write better, cleaner, more maintainable code. Learn how to manage your projects and focus on shipping your product. With insight that covers the gamut of software development [...]

This is an update to my previous how-to Setup Python 2.5, mod_wsgi, and Django 1.0 on CentOS 5 (cPanel).
The biggest reason why I chose to go with Python 2.5 at the time was because the MySQL Python (MySQLdb) package didn’t support Python 2.6. The 1.2.3c1 release does so that roadblock is lifted.
The instructions are [...]

The Problem
I’m sure many have used PHP’s default session handling capabilities. By default, PHP uses the filesystem to store session data naming files with their session id # and putting them in /tmp.
This is done for the sake of simplicity. On a single-server, low load website, this particular setup works fine. It’s [...]

Just wanted to post this quick bash script to iterate over the repositories in a directory, perform an svnadmin hotcopy, and tar/gzip the output.
By using hotcopy this can be performed on a live subversion repository and will produce a pristine backup.

#!/bin/bash
REPOS_PATH=/var/repos
mkdir -p /backups/weekly
rm -rf /backups/tmp
mkdir -p /backups/tmp/repos
for i in $(ls $REPOS_PATH); do
[...]

Sometimes, taking a few minutes to do a simple thing will save you a headache down the road.  Like changing the oil in your car, or brushing your teeth every night, or automatically backing up your databases.
The development server that I mess around on has recently accumulated a lot of data that I really don’t [...]

I’ve been using Phusion Passenger for a few months now and I’m really pleased with it.  The performace vs. Mongrel is better, but what makes it so useful is the ease of deployment.  Being able to setup a vhost in Apache just like you would for a PHP application was very appealing to me.  Having [...]

Please read the update to this article Setup Python 2.6.4, mod_wsgi 2.6, and Django 1.1.1 on CentOS 5.3 (cPanel)
Installing Python 2.5 dependencies
Install sqlite3:
$ wget http://www.sqlite.org/sqlite-amalgamation-3.6.4.tar.gz
$ tar xvfz sqlite-amalgamation-3.6.4
$ cd sqlite-amalgamation-3.6.4.tar.gz
$ ./configure
$ make
$ make install
Install Python 2.5
Download Python 2.5 source package, unzip, and enter working directory:
$ cd
$ wget http://python.org/ftp/python/2.5/Python-2.5.tgz
$ tar xvfz Python-2.5.tgz
$ cd Python-2.5
Configure Python 2.5 [...]

It’s quite the pain in the ass to manually propset for each new file added.
Edit the file .subversion/config and scroll down towards the bottom… find the [miscellany] block and uncomment the line enable-auto-props = true
In the group of options below titled [auto-props] and add a line like:
* = svn:keywords=Id Date LastChangedBy Revision

If you’re developing a website which uses mod_rewrite rules to redirect to a single point of entry (in which behind the scenes the actual url request gets passed as a query string parameter to “index.php” for example)… something like the following:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [L]

If you want to be able to [...]

« Previous Entries  Next Page »

Recent Posts

Categories

Archives