15 Nov
by: Matt in Development, Django, Infrastructure, Python
tags: centos, Django, linux, mod_wsgi, mysql, mysql-python, mysqldb, Python, setuptools
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 [...]
05 Oct
by: Matt in Development, Infrastructure, PHP
tags: memcache, mysql, php, session, session handler
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 [...]
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 [...]
There are certain situations where you want a periodically executed script to have one and only one instance running at a time to prevent against poisoning of data due to simultaneous execution.
There’s actually an extremely simple way to accomplish this in a PHP environment by taking advantage of mySQL’s built in “lock” functionality.
The following simple [...]
The info is available everywhere but for those who want it spoon fed into their eager mouths here goes:
To dump a database to an optimized sql file and then tar/gz compress the file:
> mysqldump –opt database > database.sql
> tar -czvf database.tar.gz database.sql
To export a database from the local mysql server to a remote mysql server:
> [...]
04 Feb
by: Eric in Infrastructure, PHP, Ruby on Rails
tags: apache, centos, memcached, mysql, php, rails, ruby, slicehost
I recently purchased a VPS from SliceHost.com. After ruling out a shared host and deciding on a VPS setup, SliceHost seemed to offer the most for my money. My initial setup is the 256slice, which offers 256mb RAM, 10GB of storage, and 100GB of bandwidth for $20 a month. Being able to [...]
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.