Knowledge map advanced must read: read how large-scale map data efficient storage and retrieval>>>
Download the latest PHP + Apache httpd server with version numbers of 5.5.0 and 2.4.3 respectively. After completing the configuration modification, start the Apache server and report “cannot load php5apache2″_ 4. DLL into server error
1. I thought it was a mistake in the configuration file. After careful examination, I really didn’t see any problem
2. I think it’s a mismatched thread safe version. After careful inspection, PHP and Apache are both thread safe versions
3. Remove this sentence from httpd.conf and Apache starts successfully. PHP and Apache on Windows adopt the way of DLL Dynamic link library, a CGI way. I feel that the problem lies in DLL
LoadModulephp5_module"D:\PHP\php5apache2_4.dll"
4. Looking for some posts on the Internet, there are many kinds of analysis, which makes my thinking confused. But I firmly believe that the problem will not be that PHP and Apache do not test each other. It must be that they misunderstood each other. They decided to log in to the official website of PHP, windows.php.net, and found the following paragraph, which was very clear:
WhichversiondoIchoose?
IIS
IfyouareusingPHPwithIISyoushouldusetheNon-ThreadSafe(NTS)versionsofPHP.
Apache
PleaseusetheApachebuildsprovidedbyApacheLounge.TheyalsoprovideVC11buildsofApacheforx86andx64.WeusetheirbinariestobuildtheApacheSAPIs.
IfyouareusingPHPwithApache1orApache2fromapache.org(notrecommended)youneedtousetheolderVC6versionsofPHPcompiledwiththelegacyVisualStudio6compiler.DoNOTuseVC9+versionsofPHPwiththeapache.orgbinaries.
VC9andVC11
MorerecentversionsofPHParebuiltwithVC9orVC11(VisualStudio2008and2012compilerrespectively)andincludeimprovementsinperformanceandstability.
TheVC9buildsrequireyoutohavetheVisualC++RedistributableforVisualStudio2008SP1x86orx64installed.
the visual studio distribution version of the system is 2008, corresponding to vc9, but I am using the PHP Version (vc11) compiled by visual studio 2012. If I dynamically connect to the DLL in Apache, there may be problems. Download the vc9 version of PHP again, Apache httpd server started successfully, problem solved
When downloading open source software, you should pay special attention to the version of the compilation environment, carefully read the software version releasenotes , which can often solve most problems