The collocation of windows Apache and PHP

Time:2021-1-14

It is a common problem to match the versions of Apache and PHP under windows. Here is a record of your choice. If IIS is used under windows, this article will be ignored.
Apache download address:https://www.apachehaus.com/cgi-bin/download.plx
PHP download address:https://windows.php.net/download/

1.vc

After entering the download address, Apache and PHP have vc9, vc11, vc13, VC15 and other versions to choose from, while x86 and x64 do not explain, depending on whether their operating system is 32-bit or 64 bit. Here is a description of VC
The collocation of windows Apache and PHP
VC9 => Visual C++ 2008 x86|x64 Redistributable
VC11 => Visual C++ 2012 x86|x64 Redistributable
VC14 => Visual C++ 2013 x86|x64 Redistributable
VC15 => Visual C++ 2015-2019 x86|x64 Redistributable
If your operating system does not exist, you need to download the corresponding version of VC, you need to install the corresponding VC, it is recommended to download the corresponding version of VC directly

2. Ts and nts

ts(thread safety) that is, thread safety, multi-threaded access, the use of a locking mechanism, when a thread to access a data of this class, to protect, other threads can not access, until the thread read, other threads can use. There will be no data inconsistency or data pollution. Select this version when PHP loads in ISAPI mode. Select this version when PHP loads in ISAPI mode

nts(non thread safe) is non thread safe, that is, it does not provide data access protection. Multiple threads may change the data one after another, resulting in dirty data. PHP chooses this version when running in fast CGI mode, which has better performance, It is usually loaded by the HTTP server and runs in the form of server module, which is proposed by Microsoft, so it can only run on the win platform, such as Apache and IIS under win [it is said that it works more stably in the fast CGI mode], while PHP on Linux runs in the form of Apache module or PHP FPM.

Ts and nts are selected from the PHP version. Because Apache’s working mode is thread safe, PHP also chooses the TS version.
In addition, when configuring PHP, Apache needs to use php7apache2.4.dll (PHP5 is php5apache2.2.dll). If it is NTS version, there is no such DLL, so don’t make a mistake.

3. Version

The version of Apache 2.2 supports up to php5.4

Only Apache 2.4 can be used above php5.5

Recommended Today

Rust module system

Rust module system In short: first,The rust compiler does not automatically build module relationships, need developersManualusemodKeyword to build sub module relationship, as shown in the following figure: in the main.rs (crite) is addedmod sub; Then sub becomes a sub module under the state of crite keywordcraterepresentativesrc/main.rsperhapssrc/lib.rsThe sub module calls another sub module with the help […]