September 2009 Entries

Google Sync

When I received my Nokia 5800 XM a few months ago I was really impressed that I could use Mail for Exchange to connect to Google Sync for my Contacts and Calendar entries on my Google Apps account. The one thing missing on that trio was my Email, not really a problem as I then setup a Mailbox on the phone to connect to my Googlemail through IMAP. Well this how now changed. Google have completed the trio! I went in to the Mail for Exchange profile and enabled email and viola! it synced the email.

The only draw back now with the Nokia 5800 XM is that the default mail client does not support HTML. I have got Nokia Messaging up and running that supposedly supports HTML, but the emails that come through don’t look like they should do, in fact they still look like plain text.

There are several email clients out there for S60 5th OS’s that support HTML Email but it would be nice if it was supported in their own email client.

Edit in Datasheet does not work after installing Outlook 2007

We are in the process of rolling out Outlook 2007 to our users, to enable them to better connect to SharePoint, however, since installing it on a PC with Office 2003 installed the option to edit a list in a Datasheet did not work, all we got was a page saying Error. Then when you clicked back Internet Explorer would crash, not a great start to the Rolling out Outlook 2007.

Well the issue is down to two versions of the edit in Datasheet control being installed on the Computer, one version for Office 2003 and the other is for Office 2007 (although it was only Outlook we were installing). MS say it is down the the incompatibility of the controls that enable you to edit in Datasheet. Several posts I came across suggested that I should rename the OWSSUP.DLL file in the c:\Program Files\Microsoft Office\Office12\ folder but no joy with that it still did not work.

I tried several things but to no avail, it still did not want to let me edit in Datasheet.

I eventually came across a post by someone who had a similar problem to me but had installed Project and not Outlook. He suggested that after installing the Office 2007 Application you will then need to do a re-install of Office 2003, not a repair install but a re-install.

So I tried that and it worked!

All was running smoothly till I tried to edit a document stored in SharePoint, Internet Explorer Crashed on me again. This turned out to be linked to the OWSSUP.DLL. I renamed that file in the Office12 folder and all was working like a charm.

Outlook 2007 uses Word 2007 to render CSS not IE

A news letter email that was sent out internally recently wasn’t displaying correctly in Outlook 2007, it looked fine in Outlook 2003. After some digging around it turned out that MS had made Outlook 2007 use Word to render its CSS and HTML Emails as opposed to using IE to render them.

To me this was a step back in time for the evolution of email.

A simple click on the other actions and view in browser displays the email correctly, however, its not the best option considering that we are going to be rolling out Outlook 2007 to the Firm in the coming months.

This is the MSDN article about the “Introduction to HTML Parsing and Rendering in Outlook 2007” :

http://msdn.microsoft.com/en-us/library/aa338201.aspx

They have also provided a validater tool for CSS:

http://msdn.microsoft.com/en-us/library/aa338200.aspx

But this really doesn’t help the fact the design of the news letter has now got the be re-written to support the new rendering.

With the pending release of Office 2010 people have been asking if it will be the same with Outlook 2010 and the answer is, Yes. despite all the complains MS has received, they want to keep it the way it is.

For many of us I guess this is frustrating, having to re-validate all the CSS and HTML that is in your templates, but it is only a one off and you will not need to do it with Office 2010. Once we had got over the “inconvenience” of it we just had to knuckle down and get on with it. But MS do it again!

Scheduling Backups of SQL Express Databases

We recently installed a new printing application called UniPrint. This application enables us to use the “Following Me” printing., you send a print job to your printer and if that one is in use or broken you go to the next nearest printer to you and enter in your PIN and your print job comes out at that printer.

The application has a SQL Express Database behind it, we could have pointed it to a DB on one of our SQL Servers but we wanted to keep the whole thing together so we installed SQL Express. Once the server had been installed and configured we added to the backup schedule for the weekly backup. Also like anything running on a Database I wanted to schedule daily backups of the Database, but SQL Express does not have the SQLAgent as part of it so you can not schedule jobs to run, but you can run jobs manually.

Although the server is not a critical server it would be nice to be able to back up the Database on it on a daily basis automatically.

What you can do is generate script and run that using a batch file and schedule that to run every day, however the problems I had were:

  1. the filename was always the same so it would overwrite the exisiting backup file
  2. for some reason I could not back it up to a UNC I had to do it to the local drive and default location.

So what I ended up doing was to run the script from a batch file and then immediately after run a VBScript that would copy the backup file to the network share and apply the day of the week to it for example: sqlbackup.bak would be copied to sqlbackupMonday.bak.

The reason for this is that come the Weekends tape backup we can backup all 5 backup files from the network share, then when mondays SQL backup runs it will overwrite the file that is already in the share. so we will always have 5 days worth of backups available.

I had never had to write a SQL Script before I was used to doing everything through the management console so I didn’t really have any idea of where to start.

After some digging around on the net I discovered that you can use the management studio to generate the SQL Script for you. All you need to do is set the backup job as you would do through the Management Console (right click on the Database, Tasks Back Up) and then click the Script button:

image

It will then generate the SQL script needed to backup the database:

BACKUP DATABASE [DsPcDb] TO DISK = N'c:\MSSQL.1\MSSQL\Backup\DsPcDb.bak' _
WITH NOFORMAT, INIT, NAME = N'DsPcDb-Full Database Backup', SKIP, _
NOREWIND, NOUNLOAD, STATS = 10

GO


Once I had created the script I copied and pasted into notepad and saved as C:\uniprint_backup.sql.

The next step was to create the vbscript to copy the file across and rename it on the target end:

Dim objFSO
Dim objshell

wkday = (weekdayname(weekday(date)))

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = Wscript.CreateObject("Wscript.Shell")
Set objFile = objFSO.Getfile("\\tmsrv-uf1\c$\MSSQL.1\MSSQL\Backup\_
DsPcDb.bak"
)
objFile.Copy("\\tmsrv-sq7\backup\data\uf1\DsPcD"& wkday & ".bak")

 
I saved this as uniprint.vbs and then created a batch file that first of called the SQL script and then called up the VBScript:
 
sqlcmd -i c:\uniprint_backup.sql
C:\SQLBackup\uniprint.vbs
 
Once I had saved the batch file I then added it to a Windows Scheduled task to run once a day Monday to Friday.
 
And there you go, not the best way to automate it I am sure but it works for me.


Google Apps, good for corporate collaboration?

The IT Team in the office recently received a request to look at Google Docs for some of the deals there were going to be happening in the coming months. This immediately caused alarm bells to ring, with questions about security and availability. We currently have an extranet running that was developed in-house for clients to be able to log on and access documents, I guess this would fit in along the lines of a Hybrid Cloud. However one department in the office wanted to use something else, for “small sized” deals, Google Docs. So in essence they wanted to store it in the public cloud.

Google Docs is part of the Google Apps product which is available in several flavours, Standard, free for personal use (which is what I use for email, calendar and contacts) Premier, for Businesses and costs about $50 per user per year (so about £30-£40), and also for Governments and Schools.

More and more companies are looking to put things in the “Cloud” as it means less resources for them but also makes it easier for when someone outside the corporate network needs to access whether that is a user or client.

The attraction of a Public Cloud is that there will be little resource overhead for you as a company, you pay the subscription, in this case it would have been to Google and their systems do all the work. The can even take the load off your exchange as they will provide you with email etc… so potentially you could save thousands on hardware, licensing and support. But at what risk? I work for a law firm but regardless of what sector your employer is in Security should be one of the highest concerns for your data when looking at cloud computing. So although a Public Cloud will reduce your IT costs what cost would you incur if the documents that you were storing in the Cloud were:

  1. Unavailable to the outside contact
  2. Stored incorrectly and shared across multiple users or made public to the internet

These are just two examples I can think of happening but the list could probably go on:

1. Unavailable to the outside contact

A lot of Cloud Computing vendors offer you a 99.9% uptime. But what does this 99.9% uptime actually cover? For some the 99.9% covers Power everything else is at a slightly lower percentage.

Google offer an SLA of 99.9%, however earlier this year Google suffered a huge outage to its GMail service, the outage started at 0930 GMT and lasted for approximately up to 2 and a half hours, although there were some reports that users were still having problems accessing the system up to 4 hrs. This outage also affected those on their Premier Edition of Google Apps who’s SLA is 99.9% a month. Some 113 Million users were affected by this.

If you were using that services and say a multi million pound deal was closing then, which was reliant on email, would you be compensated for the outage? if so would the compensation cover the business potentially lost?

Read the BBC news on the GMail outage here.

2. Stored incorrectly and shared across multiple users or made public to the internet

This following link describes a problem on company had when it realised that fifteen of their documents and spreadsheets had been unintentionally shared with a lot of people, some of whom were outside their network:

http://webtechlaw.com/google-docs-and-protection-personal-information

It was down to a bug in the Google Docs system.

Those documents were no top secret but had you any critical financial information in a spreadsheet, and that was visible to people who you did not want to see it, what kind of damage could that do to you as a company?

The other issue with this is in Google’s T’s & C’s

Google, which prides itself on not being evil, offers a few more protections in its online legal agreement that everyone accepts before using its products. The agreement states that users retain the copyright to content they post, submit or display using Google's services. But Google gets "perpetual, irrevocable, worldwide, royalty-free and nonexclusive license to reproduce, adapt, modify, translate, publish, publicly perform, publicly display and distribute" any of the content.

What's more, Google can make that content available to any companies or organizations it chooses.

Taken from: http://www.chron.com/disp/story.mpl/business/steffy/5984591.html

Something else that I came across was this article:

http://tinyurl.com/qjlex7 titled Could Google Docs Land You In Jail?

Scary stuff.

The other thing that crops up is where is the data stored? With Google I would guess that it is spread across the globe, great for being ultra resilient, however how does this stand up to jurisdiction of the data and Data Protection? you own the data or so you think

One other thing to take into consideration is: where is the data stored? one of the attractions and one the ideas of Cloud computing is that it isn’t just stored in one Data Centre. it is stored in several and probably in most cases across countries too, so questions on Data Protection and jurisdiction arises.

Ultimately we went back to the department and said “NO” to Google Docs as regardless of the size of the deal the data could be very sensitive. We are in the process of looking at creating an extranet based around Windows SharePoint Services

Cloud computing does have its place however it can be all to easy to get caught up in the hype, with the idea that you are saving money, and with the scalability being almost unending (you add more users to the system, you don’t need to by in more resources that will require management in house). We use Mimecasts SaaS (Software as a Service) for our Email, We still have our Exchange servers in house and users access email via Exchange, however we now have the option to leave pointers in their inbox to the messages on the Mimecast towers. The contracts for this had to go through our Corporate department to make sure that we were fully covered and not at risk. I know that one Law Firm who use the system have also had it written into their contract that the data has to be in the UK and that they can go and visit the Data Centres when ever they want to.

Install and Configure Ubuntu Server as a Web Server

I have recently started looking into Ubuntu server. All my experience has been with Microsoft and I have never really gone “out of the box” so to speak. I have installed Ubuntu desktop on a laptop before and configured compiz and a few basic things but never really looked at it as a server.

We are currently looking at hosting some “microsites” in the office, these are for news stories that appeared on the front page of the Firms website, that were then replace by another more recent story, our “"Well rounded views”. so the request came to IT to look at creating and maintaining these “microsites”. We did not want to put it with the company that was hosting our main website as that would incur an extra fee and for what it was they didn’t really want to spend any extra money, so I thought we could potentially use Ubuntu Server to host it, that way there is no licensing cost and we can run several websites/microsites on the one box.

So I downloaded the latest version of Ubuntu Server from www.ubuntu.com and installed it on a spare HP Compaq D530 desktop that I had under my desk. The install wasn’t a GUI install like Ubuntu Desktop but reminded me of the early days of when I started looking into Linux, although more straight forward than then!

Apache, MySQL and SSH Server was installed with the server install so that was all ready to rock ‘n’ roll.

I decided to split this post in to several parts:

  1. Remote Access to the server
  2. installing and configuring FTP
  3. Creating new websites
  4. MySQL admin
  5. Other

 

1. Remote Access to the Server

The next step was what do I do now? First things first I downloaded putty from: http://www.chiark.greenend.org.uk/~sgtatham/putty/ this is a free Telnet/SSH Client this mean I could run the commands from my desktop instead of having to use the physical console on the server:

2.Installing and configuring FTP

imageNow putty was connected I could run the commands I needed to run.

My first thought was, if I have this as a website, how am I to upload the files on to it? Answer ftp so I needed to install ftp on the box. Simple command to install vsftpd on Ubuntu is:

sudo apt-get install vsftpd

It will then ask you for your root password this is the password you use with your user account when you log in.

The next thing you need to do is allow access to authenticated system users to allow them to upload files. for this you need to edit the vsftpd.conf file. this can be done by typing in:

sudo nano /etc/vsftpd.conf

again enter in your admin password if you are prompted to and then a text editor will load with the vsftpd.conf file open for editing. make the following two changes:

local_enable=YES

write_enable=YES

Save and exit from nano by pressing ctrl + x. now you need to restart vsftpd. this is done by the following command:

sudo /etc/init.d/vsftpd restart

you are now ready to use your favourite ftp client to upload files to your server.

I created a folder in my user home directory for websites, as I was so used to IIS I named it to wwwroot mainly without thinking, but it is pretty descriptive.

The thing I noticed initially was that I was unable to view the folders and files I uploaded later on once I had created the website. This was down to the file and folder permissions. So what I needed to do on the server was set the permissions on the wwwroot folder by:

sudo chown -R andyk /home/andyk/wwwroot/

sudo chmod u=rwX,g=rX,o=rX /home/andyk/wwwroot

I only did this the once. On the top level

I then when I either create a new folder or upload new files have to set the permissions to 755 through my FTP client on the folder in question and all sub folders and files, this is a pain but hey its gets it all working.

3.Creating new websites

Now that I could upload files on to the server I needed to actually be able to create webistes. I was so used to IIS where it is just a case of right click and select create new website. I was thinking I was getting in to this a little too much and “in over my head” as they say. but to my surprise it was quite straight forward! The way the sites work is they are based on a configuration file that hold the info about them. the way to create a new site was to copy the existing site that was there by default and then edit the copied site, simple!

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/newsitename

once you have done that all you need do is make a few changes in the newsitename file through nono:

sudo nano /etc/apache2/sites-available/newsitename

Then, under the ServerAdmin you will need to put the following:

ServerAlias newsitename

ServerAlias www.newsitename.com

the file will also handle wild cards so if you have registered .com, .co.uk,net etc… then you could use:

ServerAlias www.newsitename.*

The DocumentRoot should be where the folder was created in your ftp uploads in my case it will be:

/home/andyk/wwwroot/newsitename

You will need to do the same with the <Directory /var/www/> line so mine looks like:

<Directory /home/andyk/wwwroot/newsitename/>

Press Ctrl + x to save and exit from nano and then type the following:

sudo a2ensite newsitename

This will then enable the site ready for you to use it.

4.MySQL Admin

I tried creating a database using the mysqladmin command but to no avail. jsut as I was about to give up I discovered the phpmyadmin. This is a Web Interface that enables you to manage your MySQL databases and create and delete DB’s. To install all you need type is:

sudo apt-get phpmyadmin

follow all the prompts and enter in the credentials for MySQL when prompted to. and hwy presto, that’s it you can now do everything from the Web Interface: http://servername/phpmyadmin and entering your log on credentials there to start creating, deleting and managing your MySQL Databases.

image

5.Other

Now I have my server up and running I have started to play around with open source products like wordpress and drupal. Wordpress is a very straight forward blog engine that enables you to create a blog and change the style and theme very easily. Drupla is a more powerfull CMS that I am still learning to use.

Both these can be freely downloaded from the internet.