Friday, September 4, 2009

I'm migrating my database to InnoDB: I guess that means I'm running Oracle

I'm migrating a few tables to start with - I'm hoping I don't take too much of a hit to performance. I just really want those proper foreign key definitions.

Wednesday, August 19, 2009

An hour with Windows 7 RC reminds me why I don't miss Windows

I've been Windows free for the past 6 months or so - and really, I don't think I miss it.

I grabbed a copy of Windows 7 RC candidate just to have a look at it running in Virtualbox and see if I can maybe use it to easily stream to my Xbox360.

I boot it up again and I get a message on my desktop saying that my copy of Windows is not genuine. This could mean one of two things. Either someone snuck into my house, deleted the copy of Windows I downloaded and installed into Virtualbox, and reinstalled a "Non Genuine" copy, or Microsoft is subtly twisting the meaning of Genuine.

Not wanting to feel like a criminal, I click on the message. Nothing happens, its not clickable. I cudgel my head for a few seconds but can't really think of where I can go in WIndows to make it connect to the mothership and validate or whatever I need to do to make my Windows "genuine".

While I'm hunting around for the validation option, I notice a little flag waving from the toolbar. It says I have important tasks - such as searching the internet for an antivirus package and running a backup. Fair enough. But why should I need to search the internet for virus software? Haven't they heard of package managers?

So I do the search. It displays a bunch of logos. Several of them I don't recognise, and some of them remind me of paying $99 a year for something that doesn't improve my life. I remember that AVG offers a decent free anti-virus software, so I click on the AVG logo.

AVG offers me two options (working from memory here). One is Expensive and the other is More Expensive. Dang it, I'm sure that they had a free option. Oh well. I enter "Windows 7 Free Antivirus" into Bing and I get a link to AVG. This time, I get three options! Free, Expensive and More Expensive. I guess they think that people coming from Microsoft's page are more in the mood to spend money.

Several mouse clicks later, I've downloaded and installed AVG. At no time was I prompted for any kind of Root password. I thought this thing was supposed to be more secure!

AVG wants me to install make Yahoo search my default. I have no idea why this would benefit me, but I guess Yahoo is paying AVG for the begging space. No thanks, I'd rather have a few more pixels for looking at websites than some irritating toolbar. Especially since Yahoo is now powered by Bing and Bing is already the Windows 7 default search engine.

AVG has installed a desktop shortcut for itself. Thanks for nothing. But easily deleted.

But then I go back into IE, and AVG has installed a toolbar anyway! And it includes Yahoo search! Now I have two seach boxes and a toolbar with a bunch of links I don't need. And the toolbar has no close button. To get rid of it, I need to go into Advanced Settings, ask it to be moved above the tabs and only then do I get a close button. Sigh.

No sooner have I run AVG, I get another warning on my toolbar. Now Windows Defender wants to scan my PC. Now that I have AVG, do I need to run Windows Defender? Or did I not really need AVG in the first place. Who knows? I don't have time to research this.

But luckily this takes me a few minutes to figure out. Because during those minutes, Windows has gotten really upset about not being Genuine and has faded my desktop to an ominous black. Its telling me I need to Activate NOW and its offering me a box to type my activation key into. Along with some useless messages about finding the key on some sticker. I get a key from the Release Candidate website, enter it, and my windows copy is now a "Genuine" "Evaluation Copy". Sweet.

Some requests for the next version of Windows:
- a package manager which allows me to install and update all kinds of commonly used software with a unified interface
- a default security model which requires an admin password too be entered when I'm installing new software
- a new culture of not pestering users with addons that aren't going to benefit them

And AVG - please be more respectful of your users. I don't mind being pestered to buy the More Expensive version, but don't hide the Free one from me just because you paid Microsoft for a link to their Windows 7 Antivirus page!

And now that I've wasted an hour or so figuring this out, I've run out of time to figure out the Xbox streaming. Back to real work!

Sunday, August 9, 2009

File Uploads in PHP

Once I got PHP working on my Dev server, still another hurdle - file upload wouldn't work because PHP wasn't handling the file upload temp directory (which is set in php.ini). To fix this, I added www-data, the user that PHP runs under, to the right group for the temp directory.

Saturday, August 8, 2009

Mounting a shared drive in Virtualbox

I wanted to share a directory from my main machine so I could import Second Life logs into my VM development environment. (I could try SL ona VM, but I'm guessing I need all the performance I can get!).

Two things to remember:
  1. Apparently mount doesn't like you naming the share the same as the mountpoint. This was causing mounting failed with the error: Protocol error.
  2. Because you need to run the mount as sudo, the mounted directory is owned by root. I used -o uid=mwgjordan,gid=mwgjordan to get around this.

Friday, July 24, 2009

ASD M210 - now sees the net!

Last Saturday I picked up an apparently unused ASD M210. Its a barcode reader with Win CE, a touch screen and a dock.
I tried for hours to get the wifi working but no luck. Some third party wifi software that just doesn't seem to want to radio. Maybe I need to open this thing up and flip a DIP switch or something. Maybe email ASD?
So I tried parking it on its dock, doing a soft reset and Voila, it can see the internet. I also got the barcode to keyboard function to work. Now I'm quite looking forward to getting it to work with Koha.
But Windows CE? Version 5 and no native Wifi? What's up with that?

Wednesday, July 22, 2009

Moodle!

One of the guys at Cert IV training mentioned Moodle to me. Its a GNU licensed CMS (course management system) which can be used just to administer training attendence, or also to deliver electronic content. According to the website, it even It even has a secondlife plugin (sloodle).

I installed moodle on my dev box (easy) and then on my website (easy once I figured out how the mysql username really worked).

Next step is to install sloodle and see if I can get it connected to Angelmark Bridge in SL.

Versioning, permissions and the development environment

Right now I have only one environment on my development machine, and one environment online at my hosting service. What I really need to do is have some kind of versioning control (CVS or similar) but I can't face another learning curve right now.

I'm going to try something very simple for the permissions and see how that goes. I don't want some kind of shell script between coding and testing and deployment.

Saturday, July 18, 2009

Installing LAMP Server

When I tried running PHPinfo, I got a Fatal error: Call to undefined function mysql_connect() error. I found some instructions here which appeared to address this problem, but they seemed to generic to be a quick answer to my problem.

So following the instructions , I installed the LAMP stack all in one hit with the following command:
sudo tasksel install lamp-server
I was still getting the following error, but at least I was getting some progress.
Warning: mysql_connect() function.mysql-connect: Access denied for user 'root'@'localhost' (using password: NO) in /var/www/phpinfo.php on line 3
Sorry unable to connect to my sql
This was easily fixed by adding the new password to the test script.

Friday, July 17, 2009

Accessing My Old Database

I copied over my old database files using a simple file copy. It appeared to work. I could query tables, but not update them.

Based on this discussion I tried flushing the tables, but that didn't seem to make a difference, so I chowned and chmoded so the mysql user had full ownership and access to the files and directory.

Thursday, July 16, 2009

Installing mysql

Using Synaptic package manager, I installed mysql server. Changed the root password and noted that mysql was now running in Services.

Using add/remove programs, I installed mysql Navigator. I was able to create a test database.

Installing Development tools in my new environment

Using the package manager, I grabbed PHP5. This seemed to also grab several additional Apache components.

I installed Eclipse and the Java Runtime environment using the instructions here. This only got me Eclipse 3.2, which is years old, but I decided to give it a go anyway.

Using the instructions here I installed PHPEclipse. It appeared to install OK, but I got an error when I tried to open a new php file. I changed to "plugin development" perspective and got a list of error messages which I then googled. This lead to this discussion on coderanch:
It looks like what happened here is that your PHP plugin authors did a naughty thing and used an internal class that is not present in the version of Eclipse that you have, so their editor is failing to load. What you need to do is check the documentation or website for the PHP plugin and see if you can figure out what version of Eclipse it works with, then try to find and install that version instead of whatever you have now. You could also report this to them as a bug, if the plugin is still being developed.
and the comment right below it from the person who originally had the issue:
Thankyou very much. I thought the problem was with me. I just down loaded the PDT all in one and I'm de-bugging well.
I did the same thing. I grabbed the pdt all in one archive according to the instructions here. This got me a working PHP IDE. Next step is to make sure the webserver works with PHP.

My new VM development environment

Yesterday I got tired of a development environment on the PC, so I decided to put a Linux machine with a full UI into a Virtual Box VM. I decided on Ubuntu 8.04 because a few things are still "complicated" on 9.

After 3 attempts (is my ISP at fault here?) I downloaded the Ubuntu ISO. I decided on 32 bit - can't see a reason to go 64 bit for this. I attached the ISO to a new Virtualbox with 1G RAM and 128G of HD, then ran the install, which went smothly.

I adjusted a few settings on Virtualbox - switched on processor support for virtualisation, 3d acceleration and nested paging. Then I ran the VM, and updated the package manager. Everything went very smoothly.

The only real complication is the resolution. Natively, the VM only offered 800*600 and 600*480. Not enough for Eclipse and a running window. I found I could get better resolution choices if I installed the Virtualbox Guest Additions. So I followed the instructions here but for some reason my copy of the Virtualbox Guest Additions had 2 different scripts for AMD and Intel, so I used the following process:
  1. cd /media/cdrom/
  2. sudo sh ./VBoxLinuxAdditions-x86.run
  3. Waited for a few minutes and the restarted the Vm
  4. Voila! The resolution in the VM now automagically adjusts to the size of my Virtualbox window.
I also added a shared folder so I could see my host directory from the guest. This is currently mounted with the following command:
  • sudo mount.vboxsf share ~/share/
Todo: mount it automatically.

This was the basics I needed for the machine. Next step was to install the development tools I needed.