Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here :

http://windows.php.net/download/

Is there a way to check whether I should install the VC9 one or the VC6 one programatically?

share|improve this question

2 Answers 2

It states on the left pane of the page you posted: Which version do I choose? If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP

If you are using PHP with IIS you should use the VC9 versions of PHP

VC6 Versions are compiled with the legacy Visual Studio 6 compiler

VC9 Versions are compiled with the Visual Studio 2008 compiler and have improvements in performance and stability. The VC9 versions require you to have the Microsoft 2008 C++ Runtime (x86) or the Microsoft 2008 C++ Runtime (x64) installed

Do NOT use VC9 version with apache.org binaries In you code you would test for apache or iis, if apache, then based on version.

in php use $_SERVER variables http://www.php.net/manual/en/reserved.variables.server.php

share|improve this answer
    
What's apache VC9 for if it tells us not to use it? –  wamp May 12 '10 at 7:11
    
you can use it with iis, not apache: Apparently apache.org's binaries are compiled w/ VC6. Mixing dynamically-loaded CRT versions creates a similar situation as statically linking it: separate heaps, meaning cross-binary memory management will cause heap corruption. Just as insidious is the possible difference in object size between the two CRT versions. If DLL A assumes a certain object is, say, 8 bytes and DLL B assumes 16 bytes, disaster is virtually assured. –  RandyMorris May 12 '10 at 9:04

The files from apache.org are indeed compiled w/ VC6. However, the Apache files from apachelounge.com are compiled w/ VC9. If you use the apachelounge install, then use VC9 PHP.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.