LAMP environment construction is a very popular framework for web development, but the corresponding version selection is very important for configuration. Today I checked the relevant information on the Internet and made some instructions about the apache version and the php version.
First of all, the two mainstream versions of apache are 2.2 and 2.4. I won’t go into details about the functional differences. I will mainly talk about the combination with php. Apache2.2 can be matched with php5.3.x and php5.4.x versions. When choosing php to use, be sure to pay attention to the "php5apache2_2.dll" file in the downloaded php directory, because when configuring apache Apache2.2confhttpd.conf" file LoadModule when "LoadModule php5_module "c:/php/php5apache2_2.dll" "must be php5apache2_2.dll, otherwise the error "the requested operation has failed!" will appear. The same is true for apache2.4, just "LoadModule php5_module "c:/php/php5apache2_4.dll" uses 2_4.
Let’s talk about the php version. The download address is http://windows.php.net/download/. When you download, you may find that there are nts version and ts version, such as:
VC9 x86 Non Thread Safe VC9 x86 Thread Safe
这两个有何区别,简单来说non-thread-safe 非 线程安全 与IIS 搭配环境,thread-safe 线程安全 与apache 搭配的 环境这个大家一定要注意,否则用错了版本,apache是无法启动的,另外在以后扩展库的下载也是有nts与ts不同的版本下载是要对应。
另外,php5.5.x版本只能和apache2.4搭配,已经不支持2.2需要大家注意