With the recent release of Debian Etch to stable I’ve updated my aged Building a PHP development server article. In it I finally admit that Apache 2 exists plus I fix an embarrassingly large amount of typos. Hopefully it will be useful to someone.
Continue reading...16. April 2007
I was stuck for a few mins just now when trying to do a ‘make install’ for php 5.2.1. I was getting the following error: apxs:Error: Activation failed for custom /etc/apache2/httpd.conf file.. apxs:Error: At least one `LoadModule' directive already has to exist.. make: *** [install-sapi] Error 1 As you can see the assumption is that Apache’s httpd.conf contains at least [...]
Continue reading...16. April 2007
I’m fighting with a MySQL server at the moment. It’s freshly compiled from source and I’ve followed all of my tried and tested instructions but it won’t start up properly and leaves a load of process hanging around that need killing before I can try starting it again. pkill wasn’t cutting it so I quickly put [...]
Continue reading...12. January 2007
Broken Javascript in IE *really* sucks as one gets really obscure error messages and alert(); becomes your only friend, or so I thought. I’ve recently done quite a lot of javascript DOM work for a site including some AJAX stuff and whilst it was a pleasure to develop in Firefox using Firebug, I’m now getting “it [...]
Continue reading...26. October 2006
I’ve updated my svn repository creation script, it now copies and imports the code. Works for me, etc. [code]#!/bin/sh # Darren Beale - siftware.co.uk # bealers@gmail.com # Oct 06 # v0.2 # This simple script creates a folder structure # containing /trunk /tags and /branches. It then places the # contents of a folder specified by the user into the trunk, # creates a subversion [...]
Continue reading...13. September 2006
I’ve been migrating a large number of websites over from one server to another, always an enjoyable task. So I get to the last one, copy the database over and do the normal mysql import along the lines of: [code]mysql -ufoo -pbar database_name < database_name.sql[/code] Errors++ Turns out the Donke^H^H^H^HDeveloper who built the application didn't care about things like [...]
Continue reading...13. September 2006
When creating a tarball, to exclude folders one simply uses the –exclude= flag: For example to tar up the contents of /var/log but to exclude /var/log/apache & /var/log/mail/ tar -jcvf logfiles.tar.bz2 /var/log/* --exclude=/var/log/apache/* --exclude=/var/log/mail/* Just in case you didn’t already know then the ‘j’ flag in the ‘jcvf’ tells tar to use bzip2 compression.
Continue reading...11. September 2006
I’m in the middle of migrating a lot of websites from one server to another. Here’s a small script I knocked up to take a dump of all the MySQL databases on that machine: [perl]#!/usr/bin/perl -w use strict; my $dumpDir = “/tmp/foo”; my $dumpUser= “root”; my $mysqlBin = “/usr/local/mysql/bin”; my $mysqlPassword = “bar”; foreach (`ls -F /usr/local/mysql/var`) { [...]
Continue reading...22. June 2006
[code]#!/bin/sh for FOO in a b c d e f; do echo $FOO done[/code] Outputs a b c d e f
Continue reading...28. April 2006
to replace all instances of - say - 127.0.0.1 with 10.0.0.1 in a file then using vi you can do: [code]:%s/127\.0\.0\.1/10\.0\.0\.1/g[/code] if you mess it up then press u for undo. Of course if it’s an important file then back it up first.
Continue reading...
16. April 2007
0 Comments