Edit Finishing: Wheat
Everyone in the selection of PHP version must be very confused, there are so many versions of the choice?
Problem:
We are now buying a new server with Windows Server 2008 R2. Configure the environment for PHP 5.4.
But we have previously developed the use of 2003,php is a 5.2 version of the porting to the new server, the program run will affect it? Or do I have to pay attention to those problems?
API version
PHP with a large version of backward-compatible upgrade, that is, 5.5 compliant 5.1-5.4, but in fact, compatibility is not optimistic, we do not expect the official PHP will give a good solution. Now in September 2013, the version has 5.2.17 5.3.27 5.4.17 5.5.3
5.2.17
This version can be said to support the most extensive version, now there are most open source software to use this version, such as drupal7.23,joomla2.5, the vast majority of domestic software: dedecms5.7, DISCUZX3, etc. the latest version is still supporting 5.2, if no special requirements, installation of this version is the most hassle-saving, but in the long run may end up being abandoned. Now many hosts in order to save labor cost also lazy to upgrade PHP version, anyway basically support. (here to insert a sentence, now the domestic software in order to compatible with more installation environment, is well-intentioned, even PHP5.1 can support (discuzX3 do not support), the most rare is not even behind the performance of how much, can do as some extreme really not easy! ) DRUPAL6 recommends using this version.
5.3.28 (recommended)
This version, though the name is a 5 start, But many people think it's the beginning of the PHP6.0 version, performance has improved, and because many APIs have changed, 5.2 compatibility is not very good, although some open source software claims to be compatible with 5.2-5.3, but the problem seems to be many, many simply give up 5.2, such as JOOMLA3 only support more than 5.3. For Drupal7 It is strongly recommended to use this version and support is fairly good. This version is also available for Drupal8, and support is pretty good. This version uses a wide range of features to make a good balance between performance and compatibility.
5.4 (lightly recommended)
5.4 Basically has been close to the whole, now relatively perfect, stability and performance is also good, the next major version of the upgrade, drupal7.x support is fair, but the third party module is not perfect. If you are lazy to upgrade later, you can install the version one-step.
5.5
from 5.3 onwards, the later version is basically the main performance of the promotion, functions and anything can be backwards compatible. 5.5 seems to have a 64-bit version, more robust performance, I did not try, do not dare to make comments.
Summarize
If open source software says the proposal installs PHP5.3, then you honestly use 5.3, do not use 5.5 what, you may think that can be compatible anyway, performance may be better, why not new? That said, but you know that open source software in the development of the general is in a specific environment development, even if the compatibility of the good will have unexpected surprises (again a strong team will not be able to all the function API compatibility test, it is quite a terrible workload!) , it will only be tested and optimized in a specific environment, and even if the compatibility problem is known, the team will not be able to modify it in order to be compatible with the newer version, not because they are inflexible, but to be considered for security and stability. In the open source environment, we should have a sense that "enough is the best", not "the latest is the best." For example, Joomla3.1 in 5.4-5.5 are running bad, and even installation can not succeed. But Drupal is also operating under the 5.5.3 (this machine), I think it is an individual case? But it seems that there have been unexpected errors in the operation, do not know whether the version of the problem, I hope not.
None-thread-safe or Thread-safe
Apache General Election None-thread-safe,iis Choose the latter (fast-cgi), I will not explain, letter brother is right.
Cloud-dwelling Community Small Addendum: 2003 system, we generally use ISAPI loading, if it is 2008 and above the system in fast-cgi mode.
Copy Code code as follows:
TS refers to thread Safety, which is typically selected when IIS is loaded as ISAPI.
NTS is None-thread Safe, which is typically run in fast CGI, with better performance.
The first Windows version of PHP3.0.17, released on October 20, 2000, started with a thread-safe version, because the Windows system is a multithreaded way of working with the Linux/unix system, which uses multiple processes. Running PHP in CGI under IIS can be very slow because the CGI pattern is based on multiple processes, not multithreading. Normally we would configure PHP to run as an ISAPI, and ISAPI is a multithreaded way, which is much faster. There is a problem, however, that many of the commonly used PHP extensions are developed with Linux/unix ideas, which can cause errors to take down IIS when they run in the ISAPI mode. Therefore, the CGI mode is the safest way to run PHP under IIS, but the CGI model needs to reload and uninstall the entire PHP environment for each HTTP request, and its consumption is enormous.
To accommodate the efficiency and security of PHP under IIS, Microsoft has fastcgi solutions. FASTCGI allows PHP processes to be reused rather than to restart a process with every new request. FastCGI can also allow several processes to execute at the same time. This solves the problem that the CGI process mode consumes too much, and utilizes the advantage that the CGI process mode has no thread security problem.
Therefore, if you are using ISAPI to run PHP you must use the thread safe version, while running PHP in fastcgi mode does not require thread safety checks, with none thread safe (NTS, non-threading security) Version to better improve efficiency.
64-bit and 32-bit selection problems
Your system is 64-bit to choose 64, is 32 to choose 32, do not explain, letter brother.
Cloud-dwelling Community small addendum: In many cases we cannot guarantee that all of the software we need to load in IIS is 64-bit, and some software must run in the 32 format compatible.