It’s raining.

June 6th, 2007

This might not sound like a big deal, but Brisbane and a lot of South East Queensland is currently dry as a bone. Actually, we are really quite screwed.

Everyone has been watching every drop that goes down the drain. We have buckets in the shower so that we can still water our herbs and chilli plants. The car has gone unwashed for months and months. We are trying to run the dishwasher only once a week. We have been encouraged to keep our water consumption down to 140L / day, sounds like a lot, but go a minute or two over the allocated 3 in the shower and it starts to become rather difficult.

So, water was a major election issue for Premier Beattie and it will be for the Federal government when it comes time for little Johnny to defend his position. The Federal government has already stepped in, trying to get the Northern NSW government to setup pipes to take water from some of the better off areas to help support Brisbane. There is also a national water grid going in that will take water from some of the other dams in the surrounding regions for Brisbane, and some desalination plants going up.

All sounds good eh? Well, not really, I’m not overly convinced that it will be in here enough. We only have about 15 months left of water if we keep going at the current rate. Our population is also increasing at about 1700 people a month, which will put further strain on our resources.

The rain is just divine, nothing nicer than listening to it while going to sleep and I just love it when it is cold (not really cold, Brisbane cold). Unfortunately this particular fall is only enough to extend the 15 month deadline by 2 days.

Some more links about the situation:

MSSQL with PHP on Windows.

May 30th, 2007

Ironic isn’t it? The MSSQL extension for PHP works better on Linux than it does on Windows.

Since the beginning of time, the MSSQL extension for PHP on Windows had a problem where empty varchar fields came through containing a space. The problem was caused by Microsoft’s own library returning the space to the PHP extension. Whether or not this was actually a bug is a different debate (Sybase docs make some strange statements that allude to, but don’t completely explain this behaviour) however what is certain is that it is a pain in the ass. Empty strings (”") are not ” “, which is not null!

So, this was transparently trimmed by PHP and happily passed to the script as an empty string, which was of course broken (some people actually want string values with 1 space in them). So this was corrected with the release of 4.3.4, which caused much screaming and gnashing of teeth.

Of course, while all this was happening, those users running PHP on Linux using FreeTDS were happily sitting back watching the fireworks as their library for interfacing with SQL Server was all good and showed empty strings for what they are, empty strings.

Thankfully, some bright spark at kromann.info had the idea of compiling the FreeTDS library as a DLL for use under Windows. Before you go and say that it a rather obvious fix, ask yourself when the last time you compiled PHP under Windows was!

Anyway, using it is a simple matter, just download php_dblib.dll for your version of PHP (the link is on the right under the PHP section of the site) and throw it in with the other extensions. Add it to your php.ini, setup a freetds.conf in your c:\ and you should be laughing. Note that you need to connect through a TDS DSN entry in the freetds.conf file as the server address, and the tds version must be at least 7 (”tds version = 7.0″).

I am extremely grateful that this library is available and replacing the antiquated php_mssql.dll with it will be the first thing I do when setting up a Windows dev environment. Check it out.

Adobe Creative Suite 3

May 6th, 2007

Just for all those people who, like me, are running Vista and had the CS3 installer crash out rudely on them, there is a relatively simple fix you can do.

Start -> Run -> cmd -> OK
cd c:\windows\system32
regsvr32 jscript.dll

It appears that if the jscript object is not registered, the installation script just panics and dies. This took a bit of head scratching, uninstalling, running clean-up scripts, disabling virus scanners until I looked at the event viewer and saw a nice error in the Application log stating “Product: Adobe Setup — Internal Error 2739″. A quick google turned up this page, which was for a different application, but with a similar issue.

Hope this saves someone a lot of grief.