SamCogan.com

Installing PHP LDAP (or other) extension after using Web Platform Installer

August 12th, 2010

I recently used the web platform installer to install IIS 7.5 and PHP on a Windows 7 machine. I also needed to install the LDAP extension, however after some time struggling to use an extension from the PHP site, or from an old install I discovered the best way to do this

  • Go to control panel, programs and select your PHP install
  • Click on change
  • Click next, then change
  • Select IIS fast CGI
  • Expand the Extensions section and tick the extensions you want to install
  • Complete the install



The extension should now be installed.

Tags: , ,
Posted in sysadmin | No Comments »

Renew an SSL certificate in IIS using the existing key

August 4th, 2010

I recently needed to renew an SSL certificate on an IIS 7 server. The usual method to do so would be to generate a renewal CSR on the server, go to the SSL provider and generate a certificate, simple. However in this case I was presented with a renewed certificate that had been created using the CSR that had been used to generate the original certificate, so how do I get this into IIS, I can just add it to my certificate store, as the machine doesn’t believe it has the private key for this cert.

The certifcate managment console has an option to renew a cert with an exisiting key, great I though, but this just gives an error about a template.

So, after some research I found a way to deal with this situation, so that I can assign the private key from the old cert, to this cert and therfore use it in IIS.

1. Open up the Certificate Services MMC, and connect to the local computer store

2. Import the new certificate into the Local Computer Personal store.

3. Export the “old” certificate including the private key do NOT set the option to delete the private key on success!

4. Delete the “old” certificate in the MMC

5. Get the the serial number from the new certificate and run this command from an elevated cmd prompt:

certutil –repairstore my “put serial here”

5. Assign the new certificate to the IIS website

Once that is done, the certificate works perfectly, without having to generate a new CSR. Thanks to Andreas Klein for his blog post that lead me to this solution

Tags:
Posted in Windows, sysadmin | No Comments »

VMWare ESX: NFS Error: unable to Mount filesystem: Unable to connect to NFS server

March 1st, 2010

Recently I was trying to get an ESX blade to connect to a NAS data store. 2 Other blades had happily connected to this data store, and this blade was already connected to a different data store, but when ever I tried to connect to this particular store, I got this error:

NFS Error: unable to Mount filesystem: Unable to connect to NFS server

So I struggled with this problem for quite some time, until I found the solution – Name Resolution. Now firstly, I would like to point out that I was connecting to this blade from ESX by IP, not name, so didn’t think resolution was a problem. However what ended up fixing this was ensuring that the NAS could resolve the ESX blade by name. I’m not sure why this was needed, as the other 2 blades had worked fine without needing proper name resolution setup, as had the connection to the other blade, but I added an entry in DNS for the ESX blade, and hey presto, it work.

So if you come across this issue, ensure your NAS can resolve your ESX server, either in your DNS server or a local host file.

Tags: , ,
Posted in sysadmin | No Comments »

How Windows Home Server made my life easier

December 7th, 2009

Like most good geeks, I like to experiment with new technology at home. I have a pretty intricate home network and enjoy adding new things to it and playing with new products. My partner, who also has to share this house, however does not. She doesn’t appreciate it when her files get moved about to accommodate my new SAN, or she has to run some other program to backup her laptop, or has to change the way she gets films off the network and onto the TV.

My partners a teacher and so has limited requirements for the home network – backup her files, let her get on the internet and be able to stream media to the TV, preferably without her having to think about it. I needed something that would do this that would remain constant and let her get on with her stuff, so she doesn’t need to get annoyed with me.

Yes, I could have put together a complicated solution using Windows Server, maybe some sort of network backup, or Acronis solution etc but I thought I’d first take a look at Windows Home Server, which should do everything I need for me. So I setup a new VM, and set it installing. I was dubious at first, there’s been a lot of negative press about WHS, however once it was installed it took me about half an hour to get it configured and start backing up the home machines.

I’m impressed with WHS, it’s primary function of backing up the home PC’s works great, it’ll bring machines out of sleep at night, run a backup and put them back to sleep. I had an occasion a few weeks ago where I needed to restore, I just burned a restore boot CD, booted the PC and connected it to the home server and ran the restore, an hour later the image was restore and the PC was back to normal.

The plugin architecture for WHS is one if its best features. You can get plugins that will do most things you need on your home network. I’m using PS3 Media Server to stream to my PS3, the inbuilt media server will stream using DLNA, however the PS3 won’t play all codecs, so the PS3 plugin encodes the files on the fly so they’ll play properly. I’m using a Jungledisk plugin to ensure all my data is backed up offsite to Amazon S3, the twitter plugin to notify me of any network problems and there are many more plugins i’m going to be looking at.

The biggest benefit of WHS is that it just works. I can just leave it running, assured that backups are working, and it will tell me if there is a problem. It deals with sharing all our files we need on the network and media streaming and so I can just forget about it, and get on with testing Exchange 2010, without disturbing anyone else’s work.

Tags: ,
Posted in Windows, sysadmin | No Comments »

Sysadvent – The advent calendar for sysadmins

December 2nd, 2009

If you’ve not heard about it before, sysadvent is an advent calendar for sysadmins. Each day in December you will find a tasty new blog post to help you on your way to Christmas. The articles cover an array of topics, if you look at last years they range from Powershell to Puppet. Take a look, they might not all be in the area your working in, but they will all be interesting.

The reason that I’m writing about this is not only because it’s a great idea, is that I’m going to be contributing some posts this year, so look out for some potential topics of Active Directory Naming, Exchange 2010 and Linux for Windows Admins.

Tags:
Posted in sysadmin | No Comments »

Have you heard of ServerFault.com???

October 22nd, 2009

If your a sysadmin, network manager, support technician or general server geek and you’ve not been to serverfault.com, I suggest you take a look.

Serverfault is a community Q&A site for sysadmins, its a great site to ask questions about your IT related problems, and get quick, useful answers from the sysadmin community. Its also a great place to share your knowledge with other sysadmins. I’ve been involved with Serverfault since the very begining of it’s beta and truly believe its one of the best IT Q&A sites out there.

Serverfault is designed by the same team that produced StackOverflow.com, a programming Q&A site, lead by Jeff Atwood (of codinghorror.com fame) and Joel Spoolsky(JoelOnSoftware.com) and was designed to be a non-evil alternative to sites like experts-exchange, and it does that job well. These sites provide an clean, intuitive interface for finding the answer to your question and encouragement to answer other peoples questions.

I vehemently believe that sharing knowledge is a good thing for sysadmins to be doing, you can be sure that if your not sure how to do something, someone else out there can help, and the feeling of being able to help someone with your knowledge when their stuck is hard to beat.

So if you’ve not done so yet, take a look at serverfault.com, and its sister sites stackoverflow.com and superuser.com, but be careful, you might find , like me, you become addicted to answering questions.

Tags: ,
Posted in sysadmin | No Comments »

XSL Citation/Bibliography Styles for Word

October 13th, 2009

After my post on getting Word for Mac to recognise new citiation styles, I got a number of requests for stylesheets to use for Harvard style referencing. I’ve found the stylesheet I used, plus a number of other ones Including ACM, IEEE etc.

I presume these are freely distributable, I can find no reason why they would not be, so here they are.

Styles.zip

Tags: ,
Posted in University | 1 Comment »

Detailed PHP errors in IIS 7

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!

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

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 »