SamCogan.com

Archive for the ‘Uncategorized’ Category

Detailed PHP errors in IIS 7

Wednesday, September 30th, 2009


After having to solve this problem a number of times I figured I ought to write this down. IIS7 by default will not show detailed PHP error messages, just a friendly 500 error, not much use when debugging.

So to enable detailed errors you need to run the following from the command line:

%windir%\system32\inetsrv\appcmd.exe set config -Section:system.webServer/httpErrors -errorMode:Detailed

Then resset IIS with IISReset

Tags: ,
Posted in Uncategorized | No Comments »


Hyper-V – you may not have permission!

Sunday, August 16th, 2009


So I decided to replace VMWare ESXi with Server 2008 R2 Hyper-V. The main reason for this was disk support. My home setup is pretty much cobbled togther from bits I had at hand. ESXi only supports SATA (or SCSI) disk and no support for USB drives, and I only had a couple of small SAta disks, but some large IDE and USB disks. I didn’t really want to buy a new large SATA disk, so I thought I would try Hyper-v.

Lets skip to now, and I have a working Hyper-V setup, with all my disks in, great, but what a saga it was getting here!

When I installed ESXi, it just worked. Installed it, downloaded the client, ran it, all good. Hyper-V was not the same simple process. I installed the Server 2008 r2 Hyper-V only server, which is essentially a Server 2008 Core install (cmd line only), with just the Hyper-V bits installed, to have as small a foot print as possible. This is great, but obviously means you need to admin it from another machine, not a problem. So I downloaded the Windows 7 Remote Admin Tools, installed them and launched the hyper-V console, that would be it you would think, oh no! You get an error about not having permissions to access the server. After much searching it turns out to remotely access the server you need to enable all sorts of firewall, DCOM and azman rights, the list is pretty large. Fortunately one of the developers on the Hyper-V project has developed a script to do most of these for you (outside of his job I might add, not paid by MS!), this can be found here – http://code.msdn.microsoft.com/HVRemote.

So I ran this tool, all ran fine, and so I thought that was it. I didn’t get the authorisation error, but then when I did connect, I got an error that “You might not have permission to perform this task”, ever so helpful. So I messed around for hours re-running scripts, changing settings etc, and then i fixed it. The error, that I was accessing the machine through an IP rather than a host name! Yes I should have checked it earlier, but what a stupid error, adn error message.

But, its up and working now, so lets see how it is.

Tags: , ,
Posted in Uncategorized | 3 Comments »


New site for Exchange Control Panel

Thursday, August 13th, 2009


I’ve created a CodePlex site for the Open Source Exchange Control Panel Project (got to get a better name!). Theres not much on it at the moment but hopefully it will give people who are interested the chance to express their interest and start some discussion.

Its located at http://ecp.codeplex.com/

Tags: ,
Posted in Uncategorized | No Comments »


Open Source Exchange Control Panel – Part II

Saturday, August 8th, 2009


As you may have seen in a previous post, I have been working on developing a control panel for Microsoft Exchange. This was done as part of my University dissertation; It was completed back in May, and obviously did well as it got me a First.

This control panel was aimed at small businesses with no IT departments, and uses PowerShell as the backend to communicate with Exchange. This works great in small, low use environments. However when you start getting multiple users, using it a lot PowerShell becomes a bottleneck. I’ve since learned that using the HMC interface, or other Exchange API is probably better suited to this, and I want to look at doing this.

There are a number of control panels that cater for Exchange out there now, and I’m sure do it better than I could, so I’m not pursing this project to try and sell it and compete with them, I think the community needs a good, open source control panel for Exchange that lets small companies administer Exchange easily, whether its for use in the office, or hosting companies that want to start offering hosted exchange services, but can’t afford the exorbitant charges for other control panels, on top of there Exchange licenses.

It may be that the code I already have is no good, that we need to start again and re-think the whole design (in fact I think its quite likely, the code was produced by myself, with no outside input, thank you university supervisors for that), but what I have already gained from this project is knowledge, about the inner workings of Exchange, that can be used to go forward.

So I’m looking for help, from anyone who wants to get involved with a creating a simple, easy to use, Open Source control Panel for Exchange 2007, and maybe even getting in first for Exchange 2010. I’ll donate whatever code I have that is useful, but anyone involved in this would be on an equal footing, everyone’s ideas are worthwhile and I’m sure there are plenty of people out there who know more about this than me.

So, if you’re interested in joining and getting this project going, send me an email, mail [@] samcogan dot com, or leave a comment here. Hopefully there are some others who are as interested and excited about this as I am.

Tags: , ,
Posted in Uncategorized | No Comments »


Macbook Pro & Windows 7 RTM – Select CD-ROM Boot Type

Saturday, August 8th, 2009


I decided today to upgrade my Macbook Pro to Windows 7 RTM. It’s been running the release candidate for some time now, with no issue. However when I came to boot from the RTM CD, I found a problem. This problem only seems to be related to the 64bit version on the Macbook, I believe the 32bit version is fine.

When you boot from the CD you’re presented with a CMD window that says:

1.
2.
Select CD-ROM Boot Type:_

Obviously this is very helpful. Apparently this is due to the fact the Macs use EFI boot, which Windows 7 now supports, but the wrong version.

To fix this you’ll need a copy of ImgBurn to create a new Macbook compatible CD to use.

Essentially the process is:

1. Insert Windows Install disc into DVD drive

2. Using the build mode of ImgBurn, go to the advanced tab, then bootable disc and then select your DVD drive in the extract boot image drop down list. Go ahead and extract the boot image and store it somewhere on your hard drive.

3. Go to the information tab and add your DVD drive as the source file

4. Options tab, check that file system is ISO9660 + IDF and UDF revision is 1.02 (should be anyway by default)

5. Go to Advanced tab, sub tab Restrictions and further sub tab ISO9660: Set Folder / File length to Level X and tick the four check boxes at the bottom (allow more than 8 directory levels, Allow more than 255 characters in path, Allow files without Extensions, Don’t Add ‘;1’ Version number to Files. (Note it’s this bit that actually solves the problem the rest is effectively just duplicating the existing disc)

6. Move to the bootable disc tab: Click the tick box to make the image bootable, emulation type to “none (custom)” and the browse and select the boot image you previously extracted from the windows disc. Finally set Sectors to load to 4.

7. Click the big create iso button to create the bootable iso.

8. And use that iso to burn a new install disc.

This then booted fine for me.

Thanks to an excellent article by ‘Dangerous Dave’ to help solve this problem here.

Posted in Uncategorized | No Comments »


Converting Bin/Cue to ISO on a Mac

Sunday, June 21st, 2009


I had downloaded some CD images that unfortunately were in the Bin/Cue format, not sure why anyone still uses that, but hey. Anyway, I had a need to use these in a VMWare setup, now yes I could have gone through and burned each of these to a CD and used that, but that uses valuable CD media, takes time and also makes the install slower. VMWare supports mounting ISO files for install, but not Bin files, so I went on a hunt to convert these files, using my mac.

After a quick Google search I found the excellent BChunk utility by Collin Allen, if you need to convert a Bin/Cue file to ISO, this does it from the OSX terminal, quickly and easily. There is a port of the Red Hat version of this tool.

BChunk BIN/CUE to ISO Converter for OSX (and Linux)

Tags:
Posted in Uncategorized | No Comments »


Looking for work over the summer

Friday, May 22nd, 2009


As I have now completed my time at University, I am going to be looking for work over July and August. So if anyone has any contract work over the summer, either in Systems Administration or Software Development, please do let me know. The work would need to be in the UK, or be done remotely, preferably in the South Yorkshire, Lincolnshire or London areas.

There is a copy of my CV attached to this post if you would like to know more. I can be contacted at mail [@] samcogan dot com.

Sam's CV

Posted in Uncategorized | No Comments »


Removing blank lines in Visual Studio

Wednesday, March 4th, 2009


Michael Freidgeim points out a clever way to remove blank lines in visual studio, which is very useful when VS decides to add them in when you import:

http://geekswithblogs.net/mnf/archive/2008/03/04/remove-empty-lines-in–text-using-visual-studio.aspx

It needs a slight modification to work with VS 2008, this will do it:
1.Click Ctrl-H
2. Tick “Use” then select ” Regular Expressions”
3. In Find specify ^$\n
4. In Replace box delete everything.
5 Click “Replace All”
All empty lines will be deleted.

Tags: ,
Posted in Uncategorized | 1 Comment »


Adding Citation/Bibliography Styles in Word 2008 (Mac)

Sunday, March 1st, 2009


I’m currently writing my University dissertation, which requires the use of the Harvard referencing system. I like words referencing system (at least in windows), but it doesn’t include the style for Harvard referencing, but I have a XSL file for doing it. Not a problem in Windows, it’s just a case of dropping it in the Bibliographies folder in the office directory and its available. However Word 2008 for Mac is a different matter.

The first issue is finding the folder to put the XSL file in. It’s hidden and looks like a nice simple word icon, it’s not it’s a package. To get to the folder for bibliography styles do this:

Go to Applications/Microsoft Office 2008/. Select the Word app, right-click it (or control-click) and select Show Package Contents. Navigate to Contents/Resources/Style/. You’ll see a bunch of XSL files in the Style folder; drop your XSL file in here.

You’d think that would be it, restart word and done. Unfortunately not, Word 2008 doesn’t like the style of the XSL file, so you need to change the following parts in a text editor:
1. On the first line: <?xml version=”1.0″ encoding=”ISO-8859-1″?>
change this to: <?xml version=”1.0″ encoding=”utf-8″?>
2. Line 13: <xsl:output method=”html” encoding=”us-ascii”/>
Change this to: <xsl:output method=”html” encoding=”UTF-8″/>

Tags: , ,
Posted in Uncategorized | 18 Comments »


Windows 7 on a Macbook Pro – 1 Month Review

Thursday, February 26th, 2009


So its over a month now since I installed Windows 7 on my Mackbook pro. I thought now would be a good time to review how its gone.

I’ll start by giving my overall view, pretty good. I’m enjoying using Windows 7 when I need to use Windows, which is mainly for .net development work. Once I had completed the install my first response was like many others, oh, its Vista. But after a few hours use it had grown on me, it was faster and far more responsive than Vista had ever been. This was compounded when I had the need to install the Telnet client. On vista this process took about 10 minutes, on 7 it took 20 seconds, I was impressed.

The next test came with installing my applications. To be honest I’m not in need of anything terribly taxing. Visual Studio was the main app and that installed and worked just fine. In fact I really had no problems with any software, other than the slight issue I mentioned in the previous post about ISO mounting software.

One of the other reasons I have a Windows install is to play games, and I’m happy to report Call of Duty 4 runs without a problem on Windows 7. Which would have been a stopping point for me!

I like the new StartBar, being able to pin applications to it, and view a preview of all the open windows for an application is great. I tried installing Ultramon for my dual monitor setup, but that wasn’t so successful. It installs and runs, but errors at the start. It still works, but the toolbar on the secondary monitor is very thin and hard to read and doesn’t interact well with the superbar.

Hardware wise, the drivers from the OSX leopard CD worked without issue, even my iSight camera worked. Any peripheral devices like printers worked with Vista drivers.

There are problems however, but not specific Macbook related problems. Explorer has an annoying habit of stopping working when you open windows. For example, you’ll open the C: drive and get a blank window. However if you open the C: drive from the run command it opens fine. However if you then try and browse from there, it stops working again, very strange error.
The shutdown process hangs quite often as well, even when you dutifully shutdown every programme before initiating it.

Finally, the one big Mac related problem is VMWare Fusion. I’ve tried running Windows 7 from inside Fusion and it boots and I could eventually get into unity mode. This is with the latest VMWare tools installed and the VM set as being a server 2008 instance. The problem is I cannot get the network to work on the VM, in either NAT or bridged mode it gets a self assigned IP address and no network access. I guess this issue maybe more of a VMWare issue than a Microsoft one, but it maybe the one thing that sends me back to Vista or XP, which is a shame.

I really like Windows 7, and I’m happy to use it as a day-to-day OS. It works well on a Macbook pro, just like XP and Vista do. Software and drive support is great, but you would expect that from something based on Vista. There are some problems, the explorer error is infuriating at times, but it’s a beta, and you find a way round it. Hopefully theses issue will be ironed out by release time, and I’d be happy to use it.
The Fusion issue is annoying and I really want that to work. But again its Beta and VMWare don’t officially support it. When it gets to release time, I’m sure it will work in fusions to.

So overall, if you want to run Windows 7 on a Mac, go for it. It works, the drivers are support, your apps should work. Just beware of the issues I’ve mentioned and the Fusions issue. If you rely a lot on running windows in fusions, I wouldn’t go for Windows 7 right now.

Tags: ,
Posted in Uncategorized | No Comments »