Upgrade to WordPress 2.8 and PHP 5.3 on IIS 7

Today I have upgraded my blog to the recently released WordPress 2.8 and to PHP 5.3 RC3 (VC9 Non Thread Safe build). If you are running WordPress (or any other PHP application) on IIS 7, then there are several reasons why it may be beneficial for you to upgrade:

  • PHP 5.3 has a number of Windows-specific bug fixes and improvements that address stability and functionality problems which existed before when running PHP on Windows. For detailed list of all the changes and fixes, refer to the news.txt file included within the PHP zip file.
  • PHP 5.3 has been compiled with the latest version of C compiler (VC9), which makes it run faster on Windows than any previous versions of PHP (which were compiled with VC6).
  • WordPress 2.8 has built-in support for IIS 7 URL Rewrite Module. Refer to IIS 7 URL Rewrite Module support in WordPress 2.8 for more details.

Overall, the upgrade went pretty smoothly and the only thing that was different from the usual process of setting up PHP on Windows was the date.timezone setting in php.ini file. Starting with PHP 5.3, this setting must be explicitly set, e.g.:

date.timezone = America/Los_Angeles

After this successful upgrade I guess it is time now “to reward myself by reading that book or an article that I’ve been putting off, or simply sitting back for a few moments and let the world pass me by”.

Have you tried upgrading to PHP 5.3 on IIS recently? What was your experience?


ruslany on June 11th 2009 in PHP, URLRewrite, WordPress

PoorFairAverageGoodExcellent (No Ratings Yet)

24 Responses to “Upgrade to WordPress 2.8 and PHP 5.3 on IIS 7”

  1. Gravatar ImageRafael responded on 12 Jun 2009 at 1:01 am #

    Hi Ruslan,

    I tried to use the contact fomr for this blog but it failed to send. I want to see if I can send you some material in regard to the WordPress Super Cache plug in to see if we can create a tutorial in regard to it. IT encompasses all the features you write about but it’s Apache specific I want to see if it can be converted to IIS 7. You can contact me via the email I left for this comment.


  2. Gravatar Imageruslany responded on 12 Jun 2009 at 9:08 am #

    Hi Rafael, some time ago I wrote a blog post about how to setup WP Super Cache plugin on IIS 7. You can find it here: http://ruslany.net/2008/12/speed-up-wordpress-on-iis-70/

    If you have more up to date information regarding Super Cache plugin, please let me know.

  3. Gravatar ImageFranklin Tse responded on 15 Jun 2009 at 10:42 am #

  4. Gravatar ImageJoseph responded on 15 Jun 2009 at 6:22 pm #

    Hello Ruslany,

    I am having a helluva time with the PHP side of this upgrade. I upgraded WP without a hitch…but PHP keeps throwing a 500 error

  5. Gravatar Imageruslany responded on 15 Jun 2009 at 8:16 pm #

    These are most probably the warnings about depricated features. To figure out what’s going on, enable detailed errors in IIS so that you get the actual error details with 500 error. If errors are indeed because of depricated fetures, try setting error_reporting = E_ALL & ~E_DEPRECATED in php.ini file.

  6. Gravatar ImageJoseph responded on 16 Jun 2009 at 1:36 pm #

    Thanks what is the detailed errors in IIS7? Is that tracing?

  7. Gravatar ImageJoseph responded on 16 Jun 2009 at 1:46 pm #

    Also I was quite confused with the new php.ini What is all the settings under the “Quick Reference” Section at the top. Is that for settings or just reference? Do I make any edits there?

  8. Gravatar Imagechrisemersonnc responded on 17 Jul 2009 at 11:21 pm #

    I’m with Joseph – going insane with the 500 errors. Spent 2 hours I didn’t have looking for help online – as usual none of the fixes apply.

    For me, my test.php page works fine (simple php info() page). However as soon as I try any of my WordPress 8.2 php pages (all database hitting) I get a 500 Internal Server Error along with 2 or 3 garbage characters on screen. Dear God why does it have to be so hard!

  9. Gravatar Imageruslany responded on 18 Jul 2009 at 12:27 am #

    Here are some troubleshooting steps that I usually do when I run into the problems with PHP/IIS/FastCGI. May be they will help you:

    1. If you use IE, disable friendly HTTP error messages in Tools -> Internet Options -> Advanced. That very often allows you to see the actual PHP error.
    2. Alternatively, in your php.ini file set error_log = “C:\php_errors.log” and then after error occured, check if there is anything in the log file.
    3. Enable detailed errors in IIS.

    Also, try upgrading to 2.8.1. There were a couple of nasty bugs in 2.8 that caused it to fail when open_basedir setting was enabled in php.ini file.

  10. Gravatar Imagechrisemersonnc responded on 18 Jul 2009 at 9:43 am #

    Thanks ruslany – but nothing there helped.
    1.) I use Firefox/Fiddler
    2.) Tried log – but nothing is being logged to that location even after reloading my site
    3.) I’m on IIS6/Win2k3 – not sure how to do anything but standard logging – and that’s revealing anything.

    My suspicion is that the key here is mysql. Because my phpinfo(); test page works fine. It’s whenever I try any of the main *.php files from my WordPress installation. Note – /wp-admin/install.php (a file that does NOT talk-to or hit the database) loads fine. It’s only URLs like /wp-admin or /index.php that give me the 500 message/garbage characters.

    Any other ideas?

    I’m thinking of forcing my machine to upgrade to win2k8 if this keeps up – just hope my 512 of RAM will be enough.

  11. Gravatar Imagechrisemersonnc responded on 19 Jul 2009 at 7:19 am #

    Well I have either gotten a bit further or just screwed things up worse somehow. Now instead of the “white screen of death” I get the semi-infamous fastcgi error:

    FastCGI Error
    The FastCGI Handler was unable to process the request.

    Error Details:

    The FastCGI process exited unexpectedly
    Error Number: -1073741819 (0xc0000005).
    Error Description: Unknown Error
    HTTP Error 500 – Server Error.
    Internet Information Services (IIS)


    I’ve given everything under the sun full permissions but I can’t get rid of the error! Argh!!!!

    Anyhow have any advice, suggestions, words of comfort?

  12. Gravatar Imageruslany responded on 19 Jul 2009 at 11:17 am #

    Do you get this error always or only when requesting a wordpress page? Try disabling all php extensions and the enabling them one by one. That should give you an idea which PHP extension causes the error.

    Also, which version of PHP do you have?

  13. Gravatar Imagechrisemersonnc responded on 19 Jul 2009 at 1:00 pm #

    I’m using php 5.3, WordPress 8.2.1 and MySQL 5.1

    Extensions used in order of activation:

    1.) extension=php_xmlrpc.dll (no problems)

    2.) extension=php_mysql.dll (as soon as I activate this one my database-hitting wordpress *.php pages produce the white page of death [couple garbage characters and a subtle 500 error - can only see the 500 error via firebug/fiddler]).

    3.) extension=php_mysqli.dll – no change – same situation as #2

    4.) extension=php_gd2.dll – no change – same situation as #2


    Also, FYI more info on my setup:

    1.) an Application Configuration mapping on my top/root website for .php set to:
    - [%SystemRoot%\system32\inetsrv\fcgiext.dll]
    - All verbs
    - Script Engine [checked]
    - Verify File Exists [checked]

    2.) a web service extension called FastCGI Handler set to:
    - Allowed
    - C:\Windows\system32\inetsrv\fcgiext.dll

    1.) Installed in c:\program files\php
    2.) Path env var includes path to c:\program files\php\ext
    3.) PHPRC env var set to c:\program files\php

    1.) 1.5 RC installed
    2.) with following INI settings
    ExePath=c:\Program Files\PHP\php-cgi.exe
    Arguments=-c c:\Windows\php.ini


    Thanks for your help

  14. Gravatar Imagechrisemersonnc responded on 19 Jul 2009 at 1:24 pm #

    Update (good news… sorta).

    I tried setting up a new fake/empty WordPress on my server with a new/empty database – and magically it all worked (the install wizard and I did a test post).

    SO – apparently my existing wordpress database has some permission (or other) issue? So now my quest is how to get my existing wordpress database fixed.

    I guess my general PHP/FastCGI/Wordpress/IIS6 setup is all ok – I’m just looking at some odd MySQL issue?


    Thanks again for putting up w/my techsupport spam.

  15. Gravatar ImageDominic responded on 15 Aug 2009 at 10:21 am #

    Thank you for providing up to date information regarding PHP on IIS7. After reading your article, I was able to resolve all of my 500 Server errors. Great article! Thanks again.

  16. Gravatar Imagemazyoyo responded on 05 Oct 2009 at 3:16 am #

    great article, its very helpful. thanks for share.

  17. Gravatar ImageBuddyRich responded on 31 Oct 2009 at 8:38 am #

    I’ve followed the guides fairly meticulously but for whatever reason I cannot get the combination of IIS 7.5 (Win7 Pro), PHP 5.3.2 (x64 VC9 NTS build), mysql 5.1.40 x64 and wordpress 2.8.4 running.

    I recently upgraded to Win7 necessitating the change to IIS7, so the whole reinstall. Prior to this I was using IIS6 (x64 mode) and an older PHPx64 build from fusionx (so it was 5.2.something) and the isapi.dll on WinXPx64 with no issues, hosting wordpress and gallery2.

    I’ve got as far as installing php and configuring the .ini. I can run a simple phpinfo.php and it returns, showing fastcgi as the handler however trying phpmyadmin or wordpress I get an eventual timeout and 500 error. A quick peak in taskman and I don’t see and php-cgi.exe processes running.

    I thought it might be the session save path but it gets as far as writting a sess_sjfskjlf file out to the path I specified in php.ini so I don’t think its a permissions issue. I enable a php_errors.log and there is nothing in it either.

    The info from the error:

    Detailed Error Information
    Module FastCgiModule
    Notification ExecuteRequestHandler
    Handler PHP via FastCGI
    Error Code 0×00000000
    Requested URL http://localhost:80/index.php
    Physical Path C:\Program Files\wordpress\index.php
    Logon Method Anonymous
    Logon User Anonymous

    Its all pointing to a permissions issue but I am sure everything is setup correct as far as NTFS permissions go.

    Coincidentally if I used everything the same but use the fusionx x64 5.2 PHP built it works.

    Is there anyway within IIS to get more detailed logging info? The standard w3svc log just shows the same 500 error, nor is there anything in event viewer.

  18. Gravatar Imageruslany responded on 31 Oct 2009 at 5:51 pm #

    @BuddyRich: The only thing I can think of that may cause problems is the fact that you have wordpress files in C:\Program Files\wordpress\. Why not to place them in the recommended IIS location which under C:\inetpub\ ?

  19. Gravatar ImageBuddyRich responded on 01 Nov 2009 at 4:44 am #

    I’ve determined it was just a lack of primetime for the x64 5.3 builds of PHP right now. I tried the same snapshot version of 32bit binaries and set the app pool to 32bit compatibility and they worked as well, so its something specific to the x64 builds. Funny that they give me a simple page but not anything that hits a database, pointing to an issue with the compiled mysql or mysqli extension perhaps?

    Given that on the windows.php.net site there are no stable x64 releases, and only nightly snapshot builds, the above might be why there are no stable x64 builds linked.

    Either way I am up and running save I had to disable URL rewrites for my Gallery2 install as it only supports the helicon 2 isapi solution on IIS (though I did see a hack to get the helicon isapi v3 solution by forcing the mod_apache rewrite methods to be used via .htaccess files which helicon v3 natively supports). Its also a shame to see them discontinue IIS support in the Gallery3 rewrite and only support apache.

    On the other hand wordpress 2.8.5 is working great with the IIS7 rewrite module.

    Thanks for your help.

  20. Gravatar ImageMichel responded on 04 Feb 2010 at 5:33 am #

    I spent a long time finding the problem for my 500 error.
    PHP just could not connect to the MySQL database server.
    Turned out that localhost by default points to ::1 and not to
    And MySQL does not listen on the IPv6 localhost IP.
    You can change this in the %SYSTEMROOT%\System32\Drivers\etc\hosts file.

  21. Gravatar ImageDave C responded on 06 Feb 2010 at 7:35 pm #

    Yes! Michael, after myself spending 2 days on this, discovered the same thing.. removing ipv6 entry for localhost in the host file fixed it. phpmyadmin now connects, and I’m sure wordpress will install…

  22. Gravatar ImageGavlar responded on 20 Sep 2010 at 8:41 am #

    one thing im having issues with is on IIS i cant get DNS working via wordpress, and it seems even a basic php call to gethostbyname() call times out too. it therefore makes the wordpress install run very slow when its trying to get rss feeds. there is a lot of advice on apache wordpress installs, but not IIS. any thoughts?

    error from the feeds is WP HTTP Error : Could not resolve host: wordpress.org.

    curl is installed.

  23. Gravatar Imageruslany responded on 20 Sep 2010 at 3:27 pm #

    Hi Galvar,

    Are you running WordPress inside of an intranet behind the proxy. Sometimes when there is a proxy, the account, under which the IIS worker process runs, does not have permissions to access the proxy server. In those cases PHP will not be able to make HTTP requests. A workaround is to run the IIS worker process under the account that has permissions to access proxy server.

  24. Gravatar ImageRoch responded on 15 Apr 2011 at 7:15 pm #

    What I am looking to do is similar. I am looking to have a static page as well as the blog appear on the main page of my wordpress site. Right now going to the settings section will only allow me to do one or the other. any feedback would be appreciated. Is there a special PHP INCLUDE tag I should be using for both to appear?

Trackback URI | Comments RSS

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

XML Markup: If You want to add XML code to the comment please XML encode it first, otherwise the code will not show up.

Recently Published Articles