windows2012core下php5.5兼容mssql数据库 (完美WASP环境搭建)
时间:2022-03-14 03:10
微软官方发布sqlsrv3.1 (2014年11月14日) 已经支持php 5.5 (可惜只支持32位版本) 但国外大神已经解决这个问题了,甚至改良到支持5.6的版本。下边跟着我 完美搭建WASP 环境吧.
Windows 2012 R2 core + apache 2.4.10(64) +php 5.5.19 (64) +mssql 2012
1.doc_root= "c:/www"
2.extenstion_dir="c:/php/ext"
DirectoryIndex index.html改为DirectoryIndex index.html index.php index.htm //支持更多的默认页
ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/"改为ScriptAlias /cgi-bin/ "c:/apache/Apache24/cgi-bin/"
<Directory "c:/Apache24/cgi-bin">改为<Directory "c:/apache/Apache24/cgi-bin">
添加
LoadModule php5_module C:/php/php5apache2_2.dll
AddType application/x-httpd-php .php
PHPIniDir "c:\php"
(2)启动Apache。
开始 --- 运行,输入cmd,打开命令提示符。分别输入如下命令(每行回车)
3.extension=php_sqlsrv_55_ts.dll
extension=php_pdo_sqlsrv_55_ts.dll
8.创建index.php
<?php
phpinfo()
?>
9. 重启 apache
.\apache\bin\httpd -k restart
successfuly! victory!!!!
本文出自 “” 博客,请务必保留此出处