PHP Version selection under Windows

Source: Internet
Author: User
Tags php error vc9

1.

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

2. PHP Large version
    • PHP4: Because it is too old, the lack of support for OO has basically been eliminated.
    • PHP5: Divided into three branch--php5.2 versions before, php5.2.x-5.3.x and PHP5.4.
①php5.2 Previous version: Because of some functional defects or bug,php5.2 prior to the basic use of the version.
②php5.2.x-5.3.x:php5.2.x stability has a great increase, and php5.3.x in the stability of a better, adding a lot of PHP5.2 does not have the function, such as built-in php-fpm, more perfect garbage collection algorithm, the introduction of namespaces, Sqlite3 support and so on. Recommended 5.3.3
Version after ③php5.4: features some changes, now PHP official website download only PHP5.4 more than the version download.
    • PHP6: Basically no application on the production line, but also basically a concept product.

3. x86/x64
    • X86:32-bit operating system
    • X64:64-bit operating system
4. Vc6/vc9/vc11
VC6, VC9, and VC11 are compiled on behalf of Visual C + + 6, Visual C + + 2008, and Visual C + + 2012 respectively.
Note that the VC9 version requires Visual C + + redistributable for visual Studio SP1 to be installed, while VC11 needs to install Visual C + + redistributable for Visual Studio 2012.

5. Thread Safety, None-thread Safe (non-thread safe)
    • Thread Safety: This version is typically selected when IIS is loaded in ISAPI mode.
    • None-thread Safe: This version is generally selected when running in fastcgi mode, with better performance.
CGI, ISAPI, and fastcgi comparisons:
  1. CGI (Common Gateway Interface/common Gateway Interface) is generally executable programs, such as EXE files, and Web servers each occupy a different process, and generally a CGI program can only handle one user request. In this way, when the user requests a very large amount of resources, such as memory, CPU time, and so on, resulting in low performance.
  2. The ISAPI (Internet Server application program Interface) is a set of Web service-oriented API interfaces provided by Microsoft that implements all of the functionality provided by CGI, and expands on this basis, such as providing a filter application interface. Most ISAPI applications are used in the form of DLL dynamic libraries, can be executed after a user request, do not disappear immediately after processing a user request, but continue to reside in memory waiting to be processed by other user input. In addition, ISAPI DLL applications and Web servers are in the same process and are significantly more efficient than CGI.
  3. FASTCGI is a CGI open extension of a scalable architecture whose main behavior is to keep the CGI interpreter process in memory and thus achieve high performance. The traditional CGI interpreter's repeated loading is the main reason for the poor CGI performance, if the CGI interpreter remains in memory and accepts the FASTCGI process manager scheduling, it can provide good performance, scalability, and so on.
PHP uses the pros and cons of ISAPI and fastcgi:
  • ISAPI: Running PHP in ISAPI mode, the biggest drawback is that the stability is not good, when PHP error, the Apache process also died.

  • Advantages of running PHP in FastCGI mode:
The first is that PHP will not break down when the error occurs, but PHP's own process when it fell (but FastCGI will immediately restart a new PHP process to replace the lost process).
Next FastCGI mode running PHP is better than ISAPI mode performance
Finally, you can run PHP5 and PHP4 at the same time

  • Some disadvantages of the FastCGI model:
using FastCGI mode is more suitable for a production environment, but it is not suitable for development machines. Because when using the Zend Studio debugger, the PHP process is returned with a 500 error on the page because FastCGI will think it timed out.
 
 



6. Apache
    • Apache has two:
①apache lounge:http://apachelounge.com/, using PHP VC11 x86 or x64 version
②apache.org:http://apache.org/, you can only use the VC6 version, and you cannot use the version vc9+ or above.

Apache is now the mainstream of the two versions are 2.2 and 2.4, note that when the PHP integration, if the use of 2.2, when choosing PHP, it is important to note that the PHP directory downloaded must have "Php5apache2_2.dll" file, because in the configuration of Apache " Apache2.2\conf\httpd.conf "LoadModule in File" LoadModule php5_module "C:/php/php5apache2_2.dll" "must be Php5apache2_2.dll , or "The requested operation has failed!" will appear The error. For apache2.4, just "LoadModule php5_module" C:/php/php5apache2_4.dll "is 2_4."

PHP Version selection under Windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.