All posts by admin

What’s going on

I’ve recently moved john-hunt.com again, from Australia to Texas in the states. The reason for this is my web host here in Australia was crap and the server kept going down (among other things.) They weren’t that terrible (hence I won’t mention them), but not worth the hassle.

Anyway, hopefully this year john-hunt.com will undergo a bit of a transformation.

MySQL 5 and old clients (like php4)

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /blah/somepage.php on line 123

The reason for this warning is because PHP4 can’t communicate with a MySQL5 server unless it’s using old passwords (set by using the OLD_PASSWORD() function below.)

There are two simple ways to fix this. The first would be to upgrade your version of php. Unless you *really* need php4 (or below?!) upgrade! I’m not sure php4 is supported any more and should be considered a security risk. If you can’t upgrade, just do this in your database:

update mysql.user set password=OLD_PASSWORD('thepassword') where user = 'theusername';
and:
flush privileges;

This should do the trick. Be warned, if you issue any GRANT statements after this you will have to update mysql.user again.

Auto_increment fun!

Discovered some fun things in MySQL today..

Set the variable @id to 0:
SET @id = 0;

Update the column id to be id + 1 – this will re-index your id column in one fell swoop. Very nice:
UPDATE tblname SET id = (@id := @id + 1);

Set the first value for an auto_increment column:
ALTER TABLE tblname AUTO_INCREMENT = 196;
(this won’t work if there are rows with a higher value already in the table)

All in all, a few nice bits and pieces for cleaning up your tables.

Ableton Live 7.3 under Wine

Amazingly, I’ve managed to get Ableton Live to work properly under Wine.. installation was a breeze, but getting it to decode MP3s properly was a head scratcher.

When I dragged an mp3 over into Ableton live, it would clip all over the place, even in the waveform which tipped me off that this wasn’t a hardware or emulation issue of some kind. Anyway, after faffing around with ffdshow and stuff, I finally found the answer:

http://appdb.winehq.org/objectManager.php?sClass=version&iId=16226 the summary says:

Install Apple iTunes and change msacm.winemp3=winemp3.acm to msacm.winemp3=QuickTime.qts to fix mp3 issue.

Now, I tried to install iTunes 8, but that was a lost cause, so I got iTunes 7 here:
http://www.pcauthority.com.au/Download/59665,apple-itunes-7.aspx

Installed that, then edited ~/.wine/drive_c/windows/system.ini and changed the above line. However this still didn’t work. What I needed to do was copy QuickTime.qts from it’s directory to system32:
cp ~/.wine/drive_c/Program\ Files/QuickTime/QTSystem/QuickTime.qts ~/.wine/drive_c/windows/system32/

Then it worked.. keep in mind that previously imported samples that are glitchy will still be glitchy as they need to be re-analysed, probably best to just delete and re-import them.

Oh, and make sure you’re using the latest version of Wine.

Western Digital Mybook World Edition (2nd edition)

The new(ish) mybook world edition
The new(ish) mybook world edition

A few weeks ago, I decided I needed some kind of NAS for my home as I’m often replacing my linux distro, installing Win7 or whatever and I wanted somewhere more permanent for my files.

I looked at the possibility of getting another PC to set up as a NAS, but this looked like it was going to be too costly, and I really needed something that could be plugged into my router which is stuck in the kitchen so I went for the WD Mybook World Edition as I knew it was running Linux and was hackable.

So far I’ve been fairly happy with it, it was *Very* easy to enable SSH and get to work fiddling with it. There’s a checkbox option on its web interface to allow SSH access. From there it’s fairly easy to install optware (similar to apt on Debian/Ubuntu) which allows you to easily install pretty much anything.

Performance is apparently a lot better than the old blue-ring version, however I must say the USB & ntfs performance is laughable – after a lot of tweaking I managed to only get 1.2MB(megabytes!)/sec out of it via USB where as I get about 5MB/sec over my wireless network! Oh well.

The only other issue I’ve had with it is the software it runs.. WD have done something very bizzare indeed and used what seems to be some kind of generic PHP software for embedded devices to run the thing. At first I thought this was just for the web front end, but no, there are all kinds of system() and shell() (or whatever it is) calls in a whole bunch of weird php files that do everything from mounting hard disks to starting other services etc.. very weird! I think significant performance gains could have been made if WD had opted for a more ‘normal’ system rather than having the overhead of a web server and php for everything.

Having said that, using optware allows you to do things as you would on a normal system without interfering with the main system which is a nice feature of optware.

Overall, I’d recommend this device – it’s not the best, but for the price I think it’s pretty reasonable.

WDTV – Western Digital TV media player

Picked up a WDTV last night for $200. As you may have guessed from some of my other posts, I’m into my A/V stuff, so this thing seemed like a bargain. Many reviews will rave about how great it is, and I must say it’s not too bad, but I have found there are bugs (even in the latest 1.0.1.2 firmware):

Playback of any AC3 file seems to result in a barely noticable (but very annoying) 100ms or so audio lag. This doesn’t drift which is good, but it makes watching anything with an AC3 soundtrack very annoying. I’ve tried various things to try and fix this and make sure it’s not me or my files, but the unit. Strangely, this only seems to occur when playing back NTSC files, and not PAL (25fps) files.

Other than that, it’s pretty good. I’ll hang on to it until I can test it on someone else’s setup. Otherwise it might have to go back to the shop!

*update*

After more testing with different files, it seems to be off-sync with a bunch of files, not just ones with an AC3 soundtrack. I also tested the device at a friends place before finally taking it back. If Western Digital manages to sort this bug out, I may consider buying it again…probably not though, manufacturers need to start testing stuff rather than just putting things out there and then releasing good firmware a year later.

I also just found out the WDTV violates the GPL, so I don’t want it anyway!

*update2*

Version 1.02 firmware is now released for the WDTV, and I’ve recently bought an AV reciever which has built in a/v delay stuff (and optical/hdmi inputs etc..) so perhaps it is time to re-purchase WDTV after all. Converting MKV/h264 to AVI/xvid for my xbox w/ac3 isn’t so great.

*update3*

I did re-buy the WDTV, and I’ve been very happy with it, but only if using firmware version 1.02.03 (I think it’s that one) which has all the sync issues sorted. Recommended!

Virtualbox 2.1

A new and significant release from Sun, Virtualbox 2.1 is now out just in time for Christmas.

I’ve been checking out a couple of new features that have been added. First, the most significant (to me) is native built in host networking support. This makes it super easy to connect a VM up to a host network adapter so that you can access the VM from the outside on the network – far easier and more simple than setting up tun/tap interfaces. It even works with wireless network devices on the host which is awesome.

The other neat new feature is 3d hardware support, this is a big deal if you’re a gamer and you use linux as it enables you to play your 3d games on VM rather than re-booting into windows or using WINE or whatever.

All in all, Virtualbox is now probably my favourite application ever, it just keeps getting better and better. If you’ve never used it before, it’s definitely worth giving it a try.

Download version 2.1