RSS

Archive | September, 2006

Remote PHP debugging

28. September 2006

0 Comments

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

Continue reading...

Bealers.com has moved

28. September 2006

0 Comments

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 Wordpress/Gallery install so if you get the odd problem then I’d appreciate a quick email: bealers@gmail.com. I know that [...]

Continue reading...

The best football chant ever

27. September 2006

0 Comments

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

Continue reading...

My PHP application directory structure

19. September 2006

0 Comments

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

Continue reading...

JigsawUK

14. September 2006

0 Comments

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

Continue reading...

Nightmare MySQL migration

13. September 2006

1 Comment

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

Excluding folders when creating a tarball

13. September 2006

0 Comments

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

iTunes 7 and a slight screw up

12. September 2006

0 Comments

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 click around their propoganda. For [...]

Continue reading...

Perl MySQL backup script.

11. September 2006

0 Comments

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

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

7. September 2006

2 Comments

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

Continue reading...