Pragmatism in the real world

Finalising installation

This post is part of a series about my experiences building a PHP app for Windows Server 2008 and IIS 7 for the European WinPHP Challenge 2009 which is sponsored by iBuildings, Microsoft and Leaseweb.

I finally had some time to finalise my Windows Server 2008 installation.

Firstly I fixed a couple of annoyances. I turned off the very stupid “Hide extensions for known file types” option in Explorer. It may make sense for the consumer OS, but it’s a pain on a server. I also turned off IE’s “Enhanced Security Configuration” for Administrators. No doubt I’m supposed to download via another computer and upload to the server, but that’s more hassle than I’m prepared for.

The PHP installer

To finish the PHP installation, I followed a tip from fellow competitor drydenmaker and grabbed the installer from windows.php.net(NTS, VC6 for PHP 5.2.x) and installed what I needed. It was trivial and “just worked” now that I know about ensuring that all relevant services are turned off before you do anything on a Window box!

Very oddly, the command line executable, php.exe, wasn’t installed by default so I added that too, along with PEAR. Both of these, along with PDO_ODBC really should be installed by default. I turned off the old-fashioned MSSQL extension too as I won’t be using it. I was quite impressed that the PHP installer correctly removed the extension from the ext folder and also removed the reference from the php.ini file.

To install PEAR on Windows boxes, you run go-pear.bat and then installing PHPUnit is easy.

SQL Server Driver for PHP

The new way to connect to SQL Server is using the SQL Server Driver extension. Surprisingly it wasn’t installed by the Windows Platform Installer for me. The installer was a little odd as it asked me where to place the extracted files! I didn’t know so guessed on C:Program FilesPHPext, which failed claiming low memory! I guessed it really meant a permissions problem, so ran it again and specified a temporary directory on the desktop. I then moved the correct DLL to the PHP/ext directory and modified php.ini myself to load the non thread safe version.

The lines to add to the php.ini file are:

[PHP_SQLSRV]
extension=php_sqlsrv.dll

Incidentally I had trouble trying to get permission to save php.ini from notepad. Even though my user is an administrator (according to control panel -> user accounts) and the security tab on the file properties said that administrators had write access, I couldn’t save. In the end I explicitly added my user to the list of permissions. Clearly my user isn’t a real administrator and I’ll need to find out how to fix that at some point.

Xedbug

Finally, for PHP, I downloaded the Xedbug DLL and installed that by placing it in C:Program FilesPHPext with the following php.ini configuration lines at the end:

[XDEBUG]
zend_extension="C:/program files/php/ext/php_xdebug-2.0.4-5.2.8-nts.dll"

I started IIS up again and my phpinfo() output showed that all was well. As an aside, it would be nice if IIS Manager told you that it had done something when you press the Restart button :) A line in the status bar would be enough. On the command line phpunit also worked :)

Subversion

We’re not going to get far without some form of version control, and TortoiseSvn just installed with no problems.

Leaseweb server

To get at the Leaseweb server, I installed Microsoft’s Remote Desktop Connection Client for Mac which seemed to work well. It’s quite Mac-like :)

I logged into my remote server and discovered a “Shudown Event Tracker” window waiting for me along with a note that I need to restart Windows because some updates have occurred. Obviously I have no idea why the server shut down unexpectedly… hopefully it won’t happen again. Not a great welcome to my new server though.

One thought on “Finalising installation

Comments are closed.