I have a question.
During the process of changing the php version to php7.1, the following error was reported when starting Apache:
System: win7 64-bit; php version: php7.1.3 thread safe 32 vc14;
apache version:
Note: Executing the php command separately under cmd can output phpinfo normally, and opening apache separately can also see it works normally! , but after adding the following statement to httpd.conf and then starting apache, the above error message will be reported
PHPIniDir "D:/webSoft/php713"
LoadModule php7_module "D:/webSoft/php713/php7apache2_4.dll"
I searched online and found that the vc14 library was missing at first. I installed it, and then I downloaded different versions of php7.1. I tried it but it still didn’t work. Please help!!!
高洛峰2017-05-16 13:15:58
httpd -t tests the apache configuration for incorrect commands.
To integrate apache and php under windons, you need to add these three configuration items so that apache can use the PHP service to parse PHP files
LoadModule php7_module "E:/wamp/php-7.0.0-x64/php7apache2_4.dll"
AddType application/x-httpd-php .php .html .htm
PHPIniDir "E:/wamp/php-7.0.0-x64"
滿天的星座2017-05-16 13:15:58
I use phpstudy, and the http.conf file loads the module using LoadModule authz_core_module modules/mod_authz_core.so similar to this instead of .dll, and there is no need to write an absolute path, just put the extension file in the corresponding directory
PHP中文网2017-05-16 13:15:58
First, you need to ensure that both Apache and PHP are 64-bit or 32-bit
Use php-cgi
No matter thread-safe or non-thread-safe
httpd.conf
Include "D:\ProgramFiles\Apache24\conf\extra/httpd-php.conf"
httpd-php.conf
LoadModule fcgid_module modules/mod_fcgid.so
<IfModule fcgid_module>
Include "D:\ProgramFiles\Apache24\conf/extra/httpd-fcgid.conf"
FcgidInitialEnv PHPRC "D:/ProgramFiles/php-7.1.3-x64/"
AddHandler fcgid-script .php
FcgidWrapper "D:/ProgramFiles/php-7.1.3-x64/php-cgi.exe" .php
</IfModule>
httpd-fcgid.conf
FcgidIOTimeout 384
FcgidConnectTimeout 360
FcgidOutputBufferSize 128
FcgidMaxRequestsPerProcess 1000
FcgidMinProcessesPerClass 0
FcgidMaxProcesses 16
FcgidMaxRequestLen 268435456
ProcessLifeTime 360
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000
Attached is mod_fcgid download
https://www.apachelounge.com/...