IT/TECH: Ever wondered how to install PHP on IIS 6/7.x

From time to time I stumble into the situation to install PHP on a Windows Server. It is an easy task, but if you never ever did it or didn't do it for a while... well, here are some tips...

Why would you do so? Well, a) it is faster than on any Linux/Unix System I saw it running and b) for a developer it is a bit more convinient (at least if he's a Windows geek like I am ;) ).

I have here two links which are quite helpful:
a) A complete and working instruction from Ruslan Yukushev

b) A short instruction on how to set the timezone in php.ini - Mr. Yukushev forgot to mention this ;)

In short explanation: search for date.timezone within php.ini, uncomment it and set it for example to: date.timezone = Europe/Berlin

That would not only make phpinfo() work ;)

An interesting note is from my experience, that neither the Webplatforminstaller from Microsoft (http://www.microsoft.com/web/Downloads/platform.aspx?ref=thisandthatfornow.blogspot.com) doesn't really make the job as well as the MSI- installers delivered on http://windows.php.net/ doesn't.

So always download the ZIP- file, extract it on a folder of your choice (ideally c:\php or c:\program files(x86)\php) and handle everything from hand.

Coming to an additional tool to use to even speed up the PHP experience on Windows. Install the Windows Cache Extension for PHP wich can be found here: http://www.iis.net/expand/WinCacheForPhp/?ref=thisandthatfornow.blogspot.com.

Installation is quite easy: Simply download the file, extract its content to the extension folder of php and add the extension within the php.ini - a detailled instruction is given within the archive - read the readme ;)

A note about the cache extension: It does work only with the NON thread safe PHP- version!

Well, so much for now from me...

2010-08-23 Appendix
The MSI installers for the most recent versions of PHP seem now to work well, so you might want to save some time by using them to install. Alternatively the Microsoft Web Platform Installer (http://www.microsoft.com/web/downloads/platform.aspx) does a great job in installing or updating PHP on Windows machines. Nevertheless, php.ini fine-tuning should be done anyways.

No comments: