問題:使用Apache2.4配置php7.0.6和php7.2.1,php7.0.6可以啟動,而php7.2.1無法啟動。
httpd.conf配置參數如下:
<IfDefine php7.0.6>
LoadModule php7_module "C:/php7.0.6/php7apache2_4.dll"
PHPIniDir "C:/php7.0.6"
</IfDefine>
<IfDefine php7.2.1>
LoadModule php7_module "C:/php7.2.1/php7apache2_4.dll"
PHPIniDir "C:/php7.2.1"
</IfDefine>
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-httpd-php .php .inc
</IfModule>
CMD執行安裝服務命令的結果如下:
C:\Apache24\bin>httpd.exe -k install -n "Apache2.4_PHP7.2.1" -D php7.2.1
Installing the 'Apache2.4_PHP7.2.1' service
The 'Apache2.4_PHP7.2.1' service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
CMD測試安裝好像也是OK的:
C:\Apache24\bin>httpd.exe -n "Apache2.4_PHP7.2.1" -t
Syntax OK
但是創建的Apache2.4_PHP7.2.1服務無法啟動,error.log文件內有如下的錯誤記錄:
[Tue Jan 09 10:51:37.960749 2018] [core:warn] [pid 12396:tid 604] AH00098: pid file C:/Apache24/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
PHP擴展的extension全部都是注釋狀態的,PHP.ini文件是初始狀態的,只修改了extension_dir。
添加回答
舉報
0/150
提交
取消