Installing PHP 5 on IIS 6

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

I’ve run PHP with Microsoft Internet Information Services (IIS) before (running on a Windows XP laptop) and I seem to remember the installation being quite straightforward. Even so, tonight I was installing PHP 5.2.6 with IIS 6 (on Windows Server 2003 R2 Enterprise x64 Edition) and I ran across a few issues. This post describes what was involved:

  • Firstly, PHP can be installed in CGI, FastCGI or ISAPI mode. I used ISAPI.
  • Secondly, there is anecdotal evidence that the Windows Installer version is problematic – for that reason you may prefer to use the ZIP file and perform a manual installation (as I did), following the instructions on the IIS Admin blog, which were:
    • Extract the files to a location of your choice (I used C:\PHP to keep it simple but C:\Program Files (x86)\PHP would be better).
    • Rename php.ini-recommended to php.ini.
    • Edit the extension_dir line in php.ini to read extension_dir = C:\phpinstallationfolder\ext.
    • Add the PHP installation folder to the %path% system variable (e.g. append ;C:\PHP to the existing path).
    • Create a web service extension for PHP using cscript iisext.vbs /AddFile c:\phpinstallationfolder\php5isapi.dll 1 PHPISAPI 1 “PHP ISAPI”. The new extension should show in IIS Manager with a status of Allowed.
    • Create an application extension mapping for .php files. Following the advice on the IIS Admin blog article that I referenced previously will remove all other mappings so I used the IIS Manager MMC instead (Default Web Site Properties, Home Directory, Configuration to add a mapping to the executable at c:\phpinstallationfolder\php5isapi.dll using extension .php for all verbs).
    • Create a test file called phpinfo.php containing <?php phpinfo(); ?>.
    • Use a web browser to navigate to http://servername/phpinfo.php and the PHP information page should be displayed.
    • If you are running on 64-bit Windows there are some extra steps in order to avoid an HTTP 500 Internal server error or the message %1 is not a valid Win32 application. It seems that this is caused by trying to load a 32-bit application (in this case PHP) inside a 64-bit worker process (as described in Microsoft knowledge base article 895976). To resolve this issue, enter cscript adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1. adsutil.vbs is one of the scripts installed into the wwwroot\AdminScripts folder but if you have removed it to secure the server (as I had), then it may be temporarily copied back to the server from another IIS installation.
    • To ensure that PHPinfo reflects the correct location of the php.ini file, create an environment variable called PHPRC referring to c:\phpinstallationfolder and restart the server or, alternatively, set the appropriate registry keys (although neither option seemed to have any effect for me).

Microsoft virtualisation news

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Some time back, there was talk of System Center Virtual Machine Manager 2008 (then called SCVMM vNext) shipping within 90 days of Hyper-V. This link was later denied, or at least downplayed (depending upon who you spoke to at Microsoft) but it seems that SCVMM 2008 is expected to ship in September… that’s ooh… about 90 days after Hyper-V. Of course, speculating on product release dates is always a risky business, but Rakesh Malhotra should know (he runs the SCVMM program management team).

On a related note, he also explains why SCVMM requires virtual center in order to integrate with VMware ESX (a question I asked a few days back after the release of the VMware Infrastructure Toolkit for Windows v1.0 (PowerShell cmdlets for VI).

Last, but not least, a Microsoft Virtualization User Group has been formed and have an inaugural meeting planned at Microsoft’s London (Victoria) offices on 24 September.

Using BITS to manage file distribution

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Microsoft’s Background Intelligent Transfer Service (BITS) has been around since Windows 2000 SP3 and provides a “firewall-friendly” means of transferring files across the network which also allows for restarts. It’s also the file transfer mechanism used for Windows updates (but is not exclusively used for Microsoft products) and is now at version 3.0 (included with Windows Vista and Windows Server 2008).

A few weeks back, I was discussing the problem of rebuilding remote servers with some colleagues. We considered that it may be advantageous to keep a copy of the build image locally (e.g. on a branch office server) but image management (making sure that the locally cached image is the latest version) is an important concern. One of my colleagues asked if BITS could be used to control the distribution of the image files (which could be expected to be around 2GB) so I decided to dig a little further. The short answer is “yes”, but there are some things to be aware of:

Microsoft provides a command line tool called BITSAdmin (bitsadmin.exe) for monitoring the progress of BITS jobs. BITSAdmin is available as a support tool for Windows XP SP2 and Windows Server 2003 but is included with Windows Vista and Windows Server 2008. James Finnigan has a good post introducing the concept of transferring files using BITS; Aaron Czechowski has another BITSAdmin script; Frank-Peter Schultze has a good post on scripting downloads with BITS; or refer to the full BITSAdmin syntax and examples for further details.

Various third party wrappers also exist, including:

I haven’t seen a PowerShell wrapper for BITS yet but I have used Alexander Sukhovey’s BGet command (batch) file to initiate and manage BITS file transfers.

If BITS is not appropriate, those with plenty of bandwidth might consider RoboCopy (I have used it in the past to synchronise folders across the network) but, for me, Mads Klinkby’s BITSync looks perfect – unfortunately the download link was unavailable at the time of writing this post.

Adobe Photoshop CS3 from a photographer’s perspective

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Photography has been one of my hobbies for almost 30 years now and for the last four years I’ve been exclusively shooting in digital format but I’m still struggling to work out a decent workflow. Adobe Photoshop CS3 box shotSo, last Friday I took the day off work to attend a short course introducing key features of Adobe Photoshop and Lightroom (provided by my local Adult Education service and presented by David Tunnicliffe) and, at £36 for 6 hours of tuition, it was a bargain. I learnt a lot – and some people might find what follows to be a little obvious – but I’m hopething that for others it might be as useful as it was for me.

Adobe Photoshop CS3 is just one product from the Adobe Creative Suite, providing many more features than most photographers will need as it is designed for the graphics art industry in general. Even so, Photoshop CS3 includes some additional components that may be very useful for a photographer:

  • Introduced with CS2, Adobe Bridge literally bridges the gap between a file browser and the various applications in the Creative Suite, providing digital asset management functionality for organising, previewing and editing images.
  • Frequently updated for new proprietary raw formats, Adobe Camera Raw (ACR) provides the tools to open and edit raw image data from a digital camera. In addition to this, it can also work with JPEG and TIFF files to provide basic editing functionality without Photoshop.

In addition to the CS3 components above, there are two more products that may be of interest:

  • DNG is Adobe’s non-proprietary and royalty-free Digital Negative format which is intended to provide a solution for archival of digital images and has now been embraced by many camera manufacturers – the notable exceptions being Canon and Nikon. I don’t fancy my chances of being able to open .NEF images from my Nikon D70 in 30 years time but I’ll stand a better chance if I convert them to .DNG and Adobe provides a free DNG converter for Windows and Macintosh users.
  • Adobe Photoshop Lightroom 2 125x125Adobe Photoshop Lightroom is a product designed by photographers, for photographers using separate library, develop, slideshow, print and web views and including the ability to import (including creating folders), catalogue (with keywords) and backup in one action.

For me, Bridge was a revelation – I use my Mac for photography (so Windows utilities were no good to me) but I’ve always found Apple iPhoto a little too simplistic. It turns out that Bridge (together with ACR) is exactly what I needed to organise my images, open them in ACR (and optionally Photoshop) to perform non-destructive edits, with the changes (and associated metadata) stored in Sidecar (.XMP) files alongside the original image (avoiding the need to maintain multiple copies of images). In addition, now that I’m using Bridge I can drop a couple of utilities that I had previously relied on:

Previously, I’d struggled to get to grips with ACR (in fact, episode 40 of This Week in Photography featured a question from me asking for some guidance) but, armed with the knowledge I gained on the course and Adobe’s understanding Adobe Photoshop Camera Raw 4 white paper, I now understand that ACR is more than just a converter and it’s often all that’s required to make many adjustments to images (the exposure control in ACR let me recover an image that had been three stops underexposed) – and that it can handle JPEG and TIFF files too.

Adobe Camera Raw 4.0

As for Lightroom, David Tunnicliffe was very keen on the product (not surprising as he took part in its development) but, whilst I can see that its potentially useful for a professional photographer and that the ability to import, catalogue and backup images in one go would make a huge improvement to my workflow, I’m still not totally convinced by the interface. Maybe I’ll change my mind at version 3!

Adobe Photoshop Elements 7 125x125For those who don’t want to spend the money on Photoshop CS3 (it is very expensive if you’re not going to use it to it’s full potential) and who can manage without Bridge (which is only sold as part of Photoshop), Photoshop Elements (for Windows or Macintosh) includes enough functionality for many photographers, although some elements are hidden from the interface (find out more about the hidden elements at Richard Lynch’s site). Also, expect to see Photoshop Express become more and more useful over time. Meanwhile, ACR and the DNG converter are free downloads so they are available to Elements users too.

For me, I’m pretty sure that my new digital photography workflow will be built around Bridge and ACR and I expect to be writing some more photography-related posts as that workflow starts to come together.

Upgrading Hyper-V (pre-release to RTM)

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

A few nights ago, I finally got around to upgrading my own Hyper-V installation from release candidate 1 to the RTM version. I’d already updated the notebook PC that I use for work but I’d forgotten about the server at home – it was working well (and if it ain’t broke…). What follows explains the process for upgrading a server that is already running a pre-release version of Hyper-V to the RTM code:

  1. On the parent partition, run the 64-bit version of Microsoft update 950050. This will update the Hyper-V components and will require a restart. After the restart, the version of Hyper-V Manager should be 6.0.6001.18016.
    About dialog from RTM Version of Hyper-V Manager
  2. On each virtual machine, upgrade the integration components ICs – also known as integration services). To do this:
    • Connect to a VM using the Virtual Machine Connection (VMC) tool and log on.
    • Cancel the Found New Hardware Wizard and select Insert Integration Services Setup Disk from the Action menu in the VMC tool.
    • A previous version of the Hyper-V integration services should be detected. Click OK to upgrade.
      Upgrade prompt for Hyper-V integration services
    • When the integration services have been upgraded, restart the virtual machine.
    • Following the restart, there should be no new hardware detected and all synthetic devices (e.g. the Microsoft Virtual Machine Bus Network Adapter) should be at version 6.0.6001.18016.
      Device driver dialog for RTM Version of a Hyper-V synthetic device

The process is time consuming and it does involve restarting every computer in the virtualised infrastructure, which should not be surprising as it also involves some pretty deep changes in the operating system (this upgrade is also from a pre-release version of Hyper-V, which implies it’s not running a production workload).

Customising a Cisco 79xx IP Phone: Ringtones

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

In my recent post on configuring a Cisco IP phone for VoIP using SIP, the RINGLIST.DAT file pointed to a file called CTU.raw – a custom ringtone for my phone. I hadn’t realised at the time but CTU is something to do with the TV series “24” and had been passed over to me with the rest of the configuration files that I used for reference. If you want to generate your own ringtones it’s quite simple but beware – there is not room for anything more than a few seconds.

I followed Jozef Janitor’s advice to create a custom ringtone, using the SoX Wrap to generate a .RAW file from an .MP3 on my Mac (I can handle the command line but SoX Wrap is also an easy way to get sox into Mac OS X). If you don’t use a Mac then Leigh Harrison offers some alternatives in his blog post on the subject and Josef’s advice suggests some others. Unfortunately though, even after truncated the file to 16KB using dd it was too long and when I tried to select it the phone displayed Custom Ring Unavailable!. Chopping it down to 15 bytes seemed to work but that left a very short clip indeed (about 2 seconds).

If you’re after a good source of pre-recorded tones, then try The Caretakers’ Website or here. I found that, including the two built-in tones, my 7940 only offered a choice of 50 tones.

Incidentally, RINGLIST.DAT is one supported file format but you can also use an XML file (as described in the Cisco Call Manager documentation for custom phone rings).

If your IP phone is in a work environment, the chances are that the administrators won’t let you add your ring tones to the system. Logan Ingalls found a workaround by using his own TFTP server but I have to warn you that they probably won’t like that either!