Archive for October, 2010


I have been tinkering with Android App Inventor a little recently, and have it set up and running on my main laptop at home.

I often work nights and have a second laptop I sometimes take with me, and thought it would be good to get App Inventor up and running on it too, for those quiet late nights when I have nothing happening at work.

Since I’d already used this laptop to root my phone, I thought ‘No worries, all the drivers I need will be installed’.

How wrong was I!!  No matter how hard I tried, the blocks editor would not connect to the phone.

Ultimately, I had to remove everything that I’d previously installed HTC wise, and re-install just the App Inventor Extras Software. Once I’d done that and reconnected the phone, all was well.

I’d also had the Android SDK installed, which had it’s own copy of adb.exe to further confuse matters.

To be sure you’re using the right one, connect your phone, open a command prompt, and navigate to c:\Program Files\Android\appinventor-extras.

Type adb devices and you should see a list of devices attached. It’ll be something like

HT06SPL00260     device

If you don’t see that, then you’ll need to run through the the process here: App Inventor Setup.

It does work, just be sure to follow it exactly!!

PHP and IIS have not always got on. My last install was hand crafted, and took some time to get the way I wanted, with the extensions I needed etc.

So, I had the need to install PHP for a customer at work, on what was a new, effectively bare install of IIS, and things have improved somewhat.

After a bit of research, I discovered I needed the following:

1. PHP for Windows, found here: PHP for Windows. Recommended was version 5.3.3 VC9 non-thread safe installer. You may also need the Microsoft 2008 C++ Runtime, which is linked to from the same page.

2. Fast CGI for IIS, found here: Fast CGI for IIS. Follow the on screen instructions to install this.

Since it was a clean install, there were no previous versions involved, I simply installed the Microsoft 2008 C++ Runtime which was appropriate for my OS, installed FastCGI, and finally, ran the PHP 5.3.3 installer, selecting FastCGI from the list presented. I also left the installed extensions as the defaults, however you can opt to install more extensions if you so desire.

By selecting FastCGI, the installer will automatically add the .php extension globally to IIS, so any new sites you create will automatically get the .php extension.

Reboot if you need to, and once the server has restarted, create a file in the root of your default website called ‘phpinfo.php’, and edit it so it contains the following:

<?php
phpinfo();
?>

Using a web browser, visit the default site and specify the phpinfo.php file. If PHP is working, this will display several pages of information about PHP. If not, you’ll need to retrace your steps to see what might have gone wrong.

The most usual problem is that the site does not know what to do with the .php extension, so just check and make sure it matches the global one, and if it doesn’t exist for your site, you can add it using the global definition as a reference.

If you are upgrading, the procedure is much the same, except you must uninstall any previous versions before starting. This will mean your sites are down, so be sure to do it when it will have the least impact. I also took a backup of my old PHP directory as a reference before uninstalling

Also, although the global settings for the .php extension will be updated, you will need to check all your PHP enabled sites to ensure the .php settings match the global settings, or your sites may not work correctly.

That’s it. Not too difficult, just take your time and don’t panic!

The last item I had to move to my D: drive was my web root folder that contained all of my websites.

I moved all but the default website, since that contained my Outlook Web Access, and I was wary of breaking it. As with any procedure, make sure you have good backups, and since this is an IIS 6 procedure, ensure you are running IIS 6 before using it.

The actual procedure is quite simple, since we are simply moving directories, and pointing the websites at the new location. Before proceeding, ensure you’ve checked each site is working, and that you know the location of the folder that contains the sites files.

First things first, start a command prompt, and run the command ‘iisreset /stop’. This will stop all services relating to IIS, and means there will be no locked files to hinder you.

Once the command has completed, locate the folder containing the files for your website. For example, the folder containing the files for this blog were at C:\web\http\Wordpress.

I then copied the entire WordPress folder and its contents to D:\web\http\. The folder was now D:\web\http\Wordpress.

I then made sure the permissions matched those of the folder in it’s original location. i then restarted IIS from the command prompt, using the command ‘iisreset /start’.

I then went to the properties of the website in IIS Manager, and at the home directory tab, changed the path to point at the new location, and restarted just that site.

I then tested the site to make sure all was well before deleting the files from their old locations.

I then repeated for all my other sites. If you want, you can issue the command ‘iisreset /restart’ when you’re done, and this will restart the whole if IIS, just to be on the safe side.

So, next on my list of ‘Things to move to D:’, were the MySQL DBs that sit behind a couple of sites I’m tinkering with, plus the DB that sits behind this very website. I’m using MySQL 5.1, but if you’re using a different version, please check before using this procedure, and as always, if you can, take a backup.

The MySQL procedure is quite different to that used for MSSQL, as you will see.

Firstly, stop the MySQL service, because you won’t be able to move a thing if you don’t.

Once the service is stopped, locate the MySQL program directory, which was C:\Program Files\MySQL\MySQL Server 5.1 for my install.

In that directory, locate the file called ‘my.ini’ and open it in notepad. Look for the comment ‘#Path to the database root’ in my.ini, and the very next line should contain the current path to all your DBs.

Locate your DB’s using the path you’ve just found. Copy all of the folders to your new drive, in my case D:\MySQL, and make sure they have the same permissions as before.

Now, go back to ‘my.ini’ and comment out the line beginning ‘datadir=’ that pointed to your original DB path. The # is used to comment out lines in MySQL.

Create a new line beneath it, beginning ‘datadir=’ and add your new path to your DBs.

For example, the line I added was datadir=”D:/MySQL/”. Save the ‘my.ini’ file, and restart MySQL.

That should be it. Check all your DBs are working, and if not, roll back the changes and look at the event logs to see what might be wrong.

Once you’re satisfied everything is working, you can delete the old directory and free up some space.

Good luck!

So, having moved my Exchange databases and logs to the new D: drive on my server, the next on my list was my MS SQL databases. NOTE: I’m using MSSQL 2005, so whilst I know this will work for that, if you have a different product, check for the product you’re using.

As with my Exchange maintenance, I’d already created a new directory structure on my D: drive, with identical permissions to the folders containing the original databases.

Before starting this process, I stopped all of the services that were using SQL to ensure the databases were not being accessed when I tried to move them. I also made sure I had a good backup before attempting the process. You don’t need to stop MSSQL to do this, and in fact if you do, you won’t be able to access your DBs to detach/attach them.

I then started up the SQL Server Management Studio, located the DB I wanted to move, right clicked on it and selected ‘Detach’.

At this point, the DB will be detached, and will be removed from the list of DBs.

At this point, go to the folder(s) containing the mdf (Database) and ldf (Log) files of the database you have just detached, and move them to the new folders you created earlier. In my case, the mdf file was moved to D:\MSSQL\DB, and the ldf file was moved to D:\MSSQL\Logs.

The next step was to go back to SQL Server Management Studio, and right click on the ‘Databases’ folder. Select the attach option and a new dialog will open.

Click the ‘Add’ button, and you’ll then get a file browser, that will let you find your mdf file in it’s new location. Select your mdf file, and hit ‘OK’. At this point you’ll probably get a warning that the log file can’t be found, and you’ll have the option to locate it. Locate your ldf file in its new location and hit ‘Ok’ again and your DB should now re-attach.

I then repeated the process for my other DBs and then restarted all my services and web sites and tested.

The detach/attach method is not the only way to move DBs around, and there’s a good resource here: Moving SQL Databases, however I found it to be a pain free way to move my DBs to my new drive.

Since I now have a server with 2 drives instead of 1, it makes sense to move my Exchange data stores over to the new drive, getting them off my O/S drive and taking advantage of the extra spindles and free space. NOTE: I’m doing this with Exchange 2003, so if you have a different version, it may not be suitable, so check first.

It is actually a pretty easy task, with the Exchange System Manager (ESM) doing all the hard work for you.

I’ll be moving the transaction logs, mailbox store and the Public folders.

To do this, start off by firing up the ESM and locating the storage group. Mine was called ‘First Storage Group’, which is the default, but yours may be called something else.

In ESM, right click on ‘First Storage Group’ and select ‘Properties’. There will be a tab labelled ‘General’. Click the ‘Browse’ button, and select the new location. In my case, I had pre-created all the folders I needed under a folder in the root of my new D: drive, so I pointed it to D:\Exchange\Logs. I also pointed the system path here in the same manner so it would use this directory for temporary Ecxhange files.

Click ‘Apply’ and Exchange will make the necessary changes, and that’s the transaction logs moved.

Next, right click on the ‘Mailbox Store’, and select properties. Once the dialog has opened, select the ‘Database’ tab. In the same manner as for the transaction logs, use the ‘Browse’ button to point to the folder where you want the database to be relocated to. You can move just the Exchange database if you want, or move the Exchange Streaming database too. I did both, and pointed at the folders I’d created before starting on my D: drive.

When you hit ‘Apply’, you will (Unless you’ve already dismounted the data store) receive a warning that the datastore will be dismounted. Anybody using Exchange will be disconnected at this point, so be sure to do this when it’s not going to disturb a lot of people.

Click ‘Yes’ to continue, and Exchange will move your data store to it’s new home. Once complete, you’ll need to go in to ESM and remount the store.

Do the same for Public folders if you wish, the procedure is identical, and again the store will need to be remounted afterwards.

Once completed, ensure your new folders have the following permissions to ensure everything works correctly:

Administrators: Full Control Authenticated Users: Read and Execute, List Folder Contents, Read Creator Owner: None Server Operators: Modify, Read and Execute, List Folder Contents, Read, Write System: Full Control.

Although I chose not to delete the old MDBdata directory, you can do so, but you will need to do some registry editing. I recommend this article: Moving Exchange Data Store to a new disk as it has some useful links to aid in troubleshooting this kind of operation.

So, Exchange is now all moved to my D: drive, and so far so good. If I hit any errors, I’ll post here.

Now my Windows installation has been moved to its new hardware home, in order to improve perfomance, I decided to do the following:

1. Move my Exchange information stores to the new second drive.

2. Move my MSSQL databases to the new second drive.

3. Move my MySQL databases to the new second drive.

4. Move my IIS6 website content to the new second drive.

This should improve overall performance since these items will no longer reside on the same drive as the O/S, and more spindles means better read/write performance.

Since each one of these tasks is not that difficult, I thought I’d share with the world! So keep an eye open, they are coming soon.

My first ‘proper’ server, was a Compaq 1600R, that I got off eBay for the princely sum of £25.

Now as I started to do more with my server, I found the hardware just wasn’t up to the job.

It could only take 1GB ram max, and had a pair of Pentium II cpu’s at 400 Mhz.

So, I hunted around on eBay, and got myself an HP DL360 G2, dual 1.4Ghz server with 3GB ram for the outrageous price of £40!

Of course this meant I had to move my existing install off my 1600R and on to my DL360. Since it was a DC, Exchange, SQL and webserver by now, I really needed the upgrade!

I found this article by Microsoft: Migrate to new hardware to be a great help in this matter.

I have now also just upgraded again, to a DL380 G3, had for just £20 (It arrived a bit bent, I straightened it out, but the seller refunded me £20!!)

Yet again, the procedure outlined in the MS document proved to be most helpful, and I have moved yet again successfully.

What is most surprising, is that the process uses NTBackup. Yes, you heard right.

I’ve tried to do the same procedure with BackupExec 12, and failed miserably, yet NTBackup did this flawlessly.

Just make sure you read the parts pertinent to your particular installation, but overall a great help and well worth a read.

Well, I’m a bit late with this this week on account of being on a night shift, and as a result, not knowing my ass from my elbow…..

However, before I got started with the shift this week I did download the full version of, yes, you guessed it, Angry Birds.

With over 3 million downloads, and with so many attempted downloads that apparently GetJars webservers keeled over, it quite a popular app!

And deservedly so, as it’s simple to play, great fun, and has an addictive quality lacking in so many games today.

My only gripe is the Ads, but lets be honest, this means you get a free game, and they aren’t overly intrusive.

If you don’t have Angry Birds, go get it now!

Well, too late for me since I’ve rooted and flashed my Desire to Froyo,  it seems that Three have finally released Froyo.

I found this article tonight (I’ve been working 10:00 til 19:00, so have only just checked up!): Three updates the HTC Desire with Android 2.2.

This is long after the hinted September release, and a month after I went a hacking….

I hope for those who didn’t want to risk ruining their phone that the wait was worth it. Update now, if you haven’t already done so.

I also hope that the extra time taken avoids some of the less enjoyable experiences other operators have given their customers.

But please, next time Three, just start working on it sooner so your paying customers with branded handsets can get more Android lovelyness sooner.

Well, I was wondering just what app that would be my app of the week, when I was caught off guard by SlideIt, a keyboard replacement that works just like Swype.

Instead of typing each letter, you rub your finger across the keys, and your movements between letters are interpreted and word possibilities are automatically added to whatever text box you are typing in. If more than one possible result comes up then you get to choose from a list of suggestions.

I have to say it’s pretty impressive and despite the odd mis-interpretation, it is quite accurate and has handled some quite large words with ease.

There are both paid and free versions, I’m currently using the free one and I like it very much.

My only complaint would be the fact that it doesn’t have the option to hold keys down for characters and numbers, though it does have a direct link to Google voice search and a nifty little drawing area that you can use to enter numbers, and it also gives you four sets of characters instead of the standard two.
Overall a very nice little app, well worth the space on your phone.

This week was a toss up between two apps. Reloop, a music making tool, and the newly released Tweetdeck for Android.
In the end, I plumped for Tweetdeck, due to a lack of time to play with Reloop.

Despite the fact that the HTC Twitter client is actually quite good, I was always a fan of Tweetdeck on the PC, so trying it on my Desire seemed like a natural progression.

I like the fact that it has a nice compact widget, that allowed me to regain some space for other items, and I like the ease of use, with large friendly obvious icons, plus the configurable columns. It certainly gives the standard client a run for its money.

Overall, a very polished app, with the only real letdown being the slightly odd installer as it is currently a beta product, though you’d struggle to tell.

Since it is beta, you need to register with Tweetdeck to get hold of it, but it only takes a couple of minutes, and it’s well worth it.

So what are you waiting for?