Choosing the right PHP version and flavor for Windows and IIS

by Klaus Graefensteiner 1. March 2010 05:06

In order to choose the right PHP runtime binaries you have to answer yourself the following questions:

What version of PHP do I need?

Is it 5.2, 5.3 or 6.0? It depends several things, like what version does your hosting provider support or does an extension that you need exist for the particular PHP version. In my case my hosting provider supports PHP version 5.2 and the Web Platform Installer also installs PHP 5.2 on my local development machine.

What Operating System is PHP running on?

It’s Windows.

What CPU architecture is my computer running?

x86 (32-bit), x64 (64-bit) or IA64)? Web Platform Installer installs the x86 PHP binaries, which run on 32-bit and 64-bit Windows.

What http web server is PHP running under?

If you run on IIS you need the Non-Thread-Safe binaries. (nts).

If you run on Apache you need the Thread-Safe binaries (ts).

I am running on IIS, which means I need the Non-Thread-Safe binaries.

Note: Some extensions (DLLs) like for example the XDebug.dll come in a XDebug_TS.dll flavor and in a XDebug.dll incarnation. The binary without the “_TS” suffix is the Non-Thread-Safe version. The DLL that ends with “_TS” is the Thread-Safe library.

And at last but not least:

What Visual C/C++ Runtime Libraries are the PHP binaries linked against?

At this point, I see you shaking your head, but it is true, PHP also distinguishes the PHP runtime files based on which version of the C-Runtime is being used for linking. The options are VC6 or VC9.

The Web Platform Installer uses the VC6 version because it uses PHP 5.2 and PHP 5.2 only comes in the VC6 flavor. PHP 5.3 has a VC6 edition that is used for Apache and a VC9 compilation that you should use for IIS to gain some performance and stability improvements.

You can find some additional information here:

http://www.php.net/manual/en/install.windows.iis7.php

and here:

http://blogs.msdn.com/brian_swan/archive/2010/02/02/getting-started-with-php-on-windows.aspx

This all boils down to…

… the following situation: For downloading PHP 5.2 on IIS (Windows) you are left with two options:

http://us2.php.net/get/php-5.2.12-nts-Win32.zip/from/a/  (VC6, notice the nts in the name.)

http://windows.php.net/download/#php-5.2-nts-VC6-x86 (VC6, notice the nts in the name  – Gets installed by Web Platform Installer)

Ausblick

For more details follow the WIMPinator Chronicles blog post series.

Tags: , , ,

Tips & Tricks | Php | IIS

Comments

3/2/2010 12:04:31 AM #

pingback

Pingback from developercast.com

Klaus Graefensteiner’s Blog: Choosing the right PHP version and flavor for Windows and IIS | Development Blog With Code Updates : Developercast.com

developercast.com |

3/2/2010 1:00:34 AM #

pingback

Pingback from websdeveloper.com

Klaus Graefensteiner’s Blog: Choosing the right PHP version and flavor for Windows and IIS | Webs Developer

websdeveloper.com |

3/2/2010 6:28:41 PM #

Pierre

Let try to post again:

PHP 5.2 has no VC9 version, it is only available as VC6 builds.

NTS can be used for any server using FastCGI as well as CLI. For PHP 5.3, I'd to recommend to use VC9 versions instead of VC6.

For official's apache, VC6 versions have to be used. However there is a VC9 version of apache availabel at http://apachelounge.com.

Pierre Germany |

3/3/2010 11:54:20 PM #

Klaus Graefensteiner

Thanks for your feedback. I will update my blog post today and make sure that I get my facts straight.

Klaus Graefensteiner United States |

3/3/2010 11:43:47 PM #

Tyrael

Seems like blogs.msdn.com/.../...ted-with-php-on-windows.aspx

Tyrael

Tyrael Hungary |

3/3/2010 11:53:13 PM #

Klaus Graefensteiner

Thanks for the reference. I am always looking for people with the same interest. I just now subscribed to Ted's blog.

Klaus Graefensteiner United States |

12/8/2012 9:35:03 AM #

pingback

Pingback from siteduct.com

Trackback Submitter

siteduct.com |

8/1/2013 2:00:36 AM #

pingback

Pingback from followliker.com

twitter software

followliker.com |

10/6/2013 5:12:57 AM #

pingback

Pingback from alexatrafficracer.org

Extended Living Spaces

alexatrafficracer.org |

Comments are closed

About Klaus Graefensteiner

I like the programming of machines.

Add to Google Reader or Homepage

LinkedIn FacebookTwitter View Klaus Graefensteiner's profile on Technorati
Klaus Graefensteiner

Klaus Graefensteiner
works as Developer In Test and is founder of the PowerShell Unit Testing Framework PSUnit. More...

Open Source Projects

PSUnit is a Unit Testing framwork for PowerShell. It is designed for simplicity and hosted by Codeplex.
BlogShell is The tool for lazy developers who like to automate the composition of blog content during the writing of a blog post. It is hosted by CodePlex.

Administration

About

Powered by:
BlogEngine.Net
Version: 1.6.1.0

License:
Creative Commons License

Copyright:
© Copyright 2014, Klaus Graefensteiner.

Disclaimer:
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Theme design:
This blog theme was designed and is copyrighted 2014 by Klaus Graefensteiner

Rendertime:
Page rendered at 4/16/2014 3:09:35 AM (PST Pacific Standard Time UTC DST -7)