Friday, November 30, 2007

php debugger finally

I've been looking around for free php debuggers. I never did get $DAYJOB to spring for nuedit phpED (and anyway, I couldn't get the demo to work when I downloaded and tried it). I've been struggling with Dmitri's DBG for a long time. Sometimes I'd get it working and sometimes not. Lately I had it pretty stable, but I never actually wanted to work with the command line debugger client since it was so ugly, not even being as nice as gdb, for instance.

I got xdebug working but didn't like the command line client. There are a lot of options though for clients. I could only test free clients though. I tried two windows clients under wine. Neither worked and I didn't care enough to work very hard at them.

Xdebug support is supposed to be in the PHP Development Tools but after trying that out for two hours or so last night (much of that time spent downloading eclipse, once from ubuntu, and once from PDT), I gave up and went to bed. I couldn't get the debugger to talk to the spawned command line program, or to a web program. I think that was mainly a failure of documentation though. It looks like a great plugin to eclipse, but I couldn't figure out how to make things work because I couldn't find any clear documentation (it may be there anyway, I just can't find it).

Timmy woke up early and I got him to sleep at 2:20AM. I went downstairs (the other hour of eclipse work) and, in between resizing videos I installed protoeditor. This was an install from source. I had to install a bunch of libraries it needed, but finally I got it compiled and running and actually stepping through a program (running under apache, and also under the command line).

This has got me sufficiently excited that I'm totally stressing my bandwidth at home and at work because I'm installing required packages on a centos 4.x vmware image at home and on my feisty box at work. Both downloads are going slow and are downloading huge numbers of packages. Ah well. I wouldn't install on the VM except I work with a team who all use a similar VM, so I need to be able to tell them how to install protoeditor on their VMs. They could install it on their host distros, but then they'd be on their own with that. Damn, I'm just at the initial yum update on the centos 4.x VM and it's downloading 95 packages!

Packages I needed to install (may not be complete since I've also previously manually installed a whole bunch of other software on this box, so it's not a virgin gutsy install anymore):

  • xlibs-dev
  • libqt3-headers
  • libqt3-mt
  • libqt3-mt-dev (not sure if really needed, I installed it anyway)
  • kde-devel (which pulls in a boatload of stuff)

OK. I just installed that on my computer at work to see if protoeditor would ./configure. It is now. I'll test if protoeditor is really working tomorrow. I could test now, but I don't like running X applications remotely over my VPN :-).

It works great locally on my laptop though.

Sunday, November 25, 2007

Don't use Union unless you know what you're doing

I got bitten by a little insect I didn't know about, the other day. I'd written a family of views to simplify something horribly complex. Except in the penultimate view I had used UNION instead of UNION ALL.

I *HAD* too read the postgresql documentation on SELECT which clearly states that:
The result of UNION does not contain any duplicate rows unless the ALL option is specified. ALL prevents elimination of duplicates. (Therefore, UNION ALL is usually significantly quicker than UNION; use ALL when you can.)

But clearly I hadn't internalized it and continued preferring UNION because it was one word instead of two :-).

The bug report set me straight though. Now I will *definitely* remember the difference between UNION and UNION ALL (in that UNION folds duplicate rows into just one).

Monday, November 12, 2007

Vista dialup plus winmodem -- can't help

A very good friend of mine bought a new computer. The new PC has Home Vista Basic on it. It works well enough for most things (that I try, anyway). There was some confusion with printer permissions for her children (she's the only administrator). I sorted that out a few weeks ago. Now she's complaining because there's a problem with the winmodem. I actually tested this a few days ago and, if I dialup to her (prepaid) ISP after a reboot, it works. I stay online for hours. But when I disconnect and try to dialup again it always fails. Diagnostics is useless (all it says is that the connection failed).

Rebooting fixes things. Just reboot, and I'll be able to connect again reliably. Unfortunately, after disconnecting, dialing up never works again until the next reboot.

I'm not able to help her because, much as I'd love to switch her to Ubuntu, I have never had any success with winmodems on linux and I'm not going to give her my US Robotics USB modem (if I could find it).

I guess she's just going to have to reboot between dialup connections to her ISP. It's the price to pay for going with windows. I'm sure things would go better with windows XP. Maybe I'll have her go back to where she bought her PC and get them to downgrade her to XP from Vista.

Microsoft, a whole bunch of bastards who force a pregnant woman to go to her PC store so they'll tell her they can't downgrade her to XP.

Wednesday, November 07, 2007

Catching up

The last 4 weeks or so have been hectic.

  • Timmy's nanny had to go home to the province and then wasn't allowed to come back by her husband.
  • Timmy got sick and we had to spend a work week in the hospital,
  • I got to work but had to catch up on a lot of things (still not caught up),
  • Preparations for Timmy's birthday, the actual birthday and then a long weekend (spent with family, so not much work got done)

Things are getting back to normal though. Mainly because of the Nanny and hospital issues, I stopped reading email for a while. I just sped through my work email. Fortunately I'm caught up there. Now I need to get caught up on my tasks. That's going to be more hecticity for another week or two.

Monday, November 05, 2007

Gutsy dist-upgrade

I waited a few weeks before upgrading to Ubuntu Gutsy Gibbon because I've always had trouble with Ubuntu dist-upgrades and I wanted to get past some milestones first (Timmy's birthday, for one) before trying to upgrade and possibly ending up with a broken system that I'd have to spend a day or more fixing.

I've never had success with any Ubuntu online distro upgrade, and I've been trying it since Dapper. Twice I've broken my system sufficiently badly that I had to reinstall from CD (I could probably have fixed it, but I'm not all that familiar with dpkg or grub, and both times I had problem with one or both of those subsystems).

I'm pretty sure that those failed online upgrades were my fault. I install packages from multiverse, universe and some lesser known repositories. I also will sometimes monkey with files that the packages require to exist or be in one or another format. In any case, I'd done some similar monkeying with Feisty, so I wasn't confident that the distro upgrade would work flawlessly.

I finally made the plunge last night after a marathon of converting images (renaming more logically/usefully, at my wife's request), videos (converting in kino to divx so that they're 1/4 to 1/6 original size), and backing up everything (rdiff-backup to my external hard drive, and the images and videos to my wife's external hard drive and laptop, because losing timmmy's pictures and videos is inconceivable).

As usual, I didn't get a flawless upgrade. Fortunately, however, this time there was just one major problem. Initially there was a weird minor issue when the distro upgrade seemed stuck. I did an strace on the process and noticed that it seemed to be in a loop working on the linux kernel image. So I killed that and after a

dpkg --configure -a

restarted the distro upgrade. It worked better after that, asking me what to do about config files that I'd manually modified. For some questions I kept my changes (always after viewing a diff of the config files), others I allowed the distro to replace my changes.

Again, though, the distro upgrade failed. This time on an package that involved mobile devices (not sure how I got that installed, probably with the evolution integration package). That was bad enough that I had to dpkg --configure -a again, and then remove all the packages so that the upgrade could continue.

I had to go to bed after some pressure from my wife, and then a 30 minute brownout almost broke the install. After more pressure from my wife (including her turning off and unplugging my laptop :-), I finally went to bed and restarted the distro upgrade in the morning. Fortunately, everything worked fine after that and I've got a usable Gutsy system now.

There is one problem though. Firefox (even with all add-ons removed) crashes randomly on some sites, and consistently (as in EVERY SINGLE TIME) on blogger. Which is why I'm posting this using epiphany. I was going to use Opera, but I decided to try the different browsers available with Ubuntu first before switching to Opera. Galeon breaks in the same way Firefox does. Clearly it uses the same buggy library. Fortunately, epiphany works well. I think I'll switch to epiphany until Firefox is fixed. I'm sure going to miss adblock though, and noscript, etc.

I use gnomad2 (since we've got a creative nomad zen mp3 player which we use mainly to play lullabies for Timmy to sleep to), and that works perfectly. I'm hoping that kino and ffmpeg work a bit better in Gutsy. In Feisty, most files would convert to divx medium quality. But some files would produce zero length .avi files. Those I'd have to reconvert to the next higher quality level just so that it'd be divx (and still half the size of the original avi file). I'll have to test kino with ffmpeg again on those files :-).

Upgrade: I broke down and googled for the firefox problem (first I ran firefox in a terminal so I could see the error message when it died).

It's a bug with libhunspell. The workaround is to disable spell checking in firefox. Turn off Edit|Preferences|Advanced|Check my spelling as I type..

Cool. I was liking epiphany, but some things were irritating (no multiple home pages, no multiple rows of tabs, although I really liked how fast it was, but no NoScript or AdBlock).