Archive | September, 2006

Remote PHP debugging

After 8 or so years of being a professional web developer I today finally cracked using a debugger with PHP. I’ve been a long suffering PHPEdit user from since it was open source and into having to pay (twice) for a licence. Unfortunately I started getting very irritated by some annoying and performance degrading bugs [...]

Continue Reading

Bealers.com has moved

I physically moved Bealers.com last night as well as pointing it to new nameservers. I was getting reports of the odd DNS error where it was previously. It's a big site > 2GB of photos and a modified Word proofreading services press/Gallery install so if you get the odd problem then I'd appreciate a quick [...]

Continue Reading

The best football chant ever

I went with Karl to see Orient play last night. I soon realised just how much I miss being able to go to regular games, but seeing as it's my only regret about leaving London, I can live with it. Anyway, the game was really exciting to start off with both sides giving a good [...]

Continue Reading

My PHP application directory structure

Rob Allen, who is on PHPWM and who I met at the recent PHPWM meeting in Worcester posted something on his blog detailing his prefered directory structure recently. Here's mine, seemingly nicked straight from FHS: /home/$USER/www/$PROJECT: /codebase /bin // anything with a shebang in /etc // config files /htdocs // document root /lorder cheap priligy [...]

Continue Reading

JigsawUK

I came across JigsawUK just now after following a link from The Multipack's blog. According to their front page it is: …a wiki for young British digital media companies and organisations to: * Showcase new Internet and mobile projects * Advertise digital media jobs * Announce

Continue Reading

Nightmare MySQL migration

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 [...]

Continue Reading

Excluding folders when creating a tarball

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.ta cheap viagra online without prescription r.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 [...]

Continue Reading

iTunes 7 and a slight screw up

Apple launched loads of new stuff today: Something about smallest ipod Somthing about bigger ipods Something about the medium ipods being bigger, but smaller and lasting longer New iTunes, does some new stuff Whilst I was waiting for iTunes 7 to “Determine Gapless Palyback Information” over my 75Gb of music I had a very brief [...]

Continue Reading

Perl MySQL backup script.

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 [...]

Continue Reading

Emulating PHP’s substr() with Smarty [sort of]

Today I had a requirement to strip off the first 9 digits from a string from within a Smarty template. The system using Smarty is *totally* locked down so no access to plugins or using php functions as modifiers so I could not simply do $string=substr($string,9); or even {assign var=”shorterThing” value=$thing|substr:9} In the end I [...]

Continue Reading