0

PHP on IIS

Posted on September 24th, 2007 / No Comments »
Tags: , , , ,

Microsoft’s IIS.net site has a new section: PHP on IIS. This is kind of strange on several levels. First off is the idea of Microsoft supporting non-Microsoft server side languages in IIS. Yeah, you’ve been able to do this for a long time (I remember running a perl ISAPI module in IIS in the 90s), but quite frankly it wasn’t that great. Just getting it to run usually involved way too much voodoo. It looks like we are starting to get something that resembles official support for PHP on IIS.

Another strange think is that this was announced in conjunction with their Go Live release of FastCGI for IIS 5.1 and IIS 6.0. Those using IIS 7 will have to wait until Vista SP1 or running Server 2008 Beta 3 or better. I suppose IIS 7 doesn’t have a large share of the IIS web server market so perhaps it isn’t much of an issue.

It looks like FastCGI will be the official way to run PHP on IIS going forward.

The IIS.net site has some documentation on how to get various PHP apps running on IIS, including WordPress on IIS.

My first choice is still a un*x box though :-)

11

WordPress File Uploads With IIS

Posted on September 4th, 2007 / 11 Comments »
Tags: ,

I didn’t have any problems getting WordPress to work on Windows Vista, IIS7 and PHP 5 (ISAPI). That is, until I tried to upload an image. After hunting around and gathering tips and ideas from others here is what I had to do:

  1. Edit upload_tmp_dir option in php.ini. In my case I created an uploads folder in the wwwroot: upload_tmp_dir = “c:\inetpub\wwwroot\uploads”
  2. Create the c:\inetpub\wwwroot\uploads folder and grant the IUSR full control of it
  3. Create the uploads folder in your wp-content folder, for me this was in c:\inetpub\wwwroot\wordpress-trunk\wp-contents\uploads, then grant the IUSR full control of it
  4. Restart the IIS service (to pick up the php.ini change)

After that I was able to upload files in WordPress running under Vista and IIS7. I haven’t tried to fine tune the permissions issue, it is possible that this can be done without having to grant full control of those folders to the IUSR account.

Ads