Xampp MS SQL server PHP 5.6

戏子无情 提交于 2019-11-27 03:35:06

问题


I have a xampp running with PHP 5.6. Normally I use mysql server, but for a script that already exists i need a MS SQL server.

I searched on the net and installed SQL server 2012.

But now I need the drivers for PHP. Unfornunately I can only find a version that supports 5.4, 5.5..

(http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx)

Is there a way to let this work with 5.6?


回答1:


Microsoft recently released a new version (3.2) of the SQL Drivers for PHP which includes compatibility with PHP 5.6.

You can download the drivers here: https://www.microsoft.com/en-us/download/details.aspx?id=20098




回答2:


I searched the net for a while.. After posting this question for 10m, I finally found a unofficial driver..

Hope this works, I will check this out..

You can find it on: http://robsphp.blogspot.be/2012/06/unofficial-microsoft-sql-server-driver.html




回答3:


I believe it's time to revisit this answer a bit better. Since you've been pretty clear with your setup. The short answer is placed as steps below

  1. Download ver 3.2 of the SQLSRV drivers from here. https://www.microsoft.com/download/details.aspx?id=20098
  2. Do extract them to your "xampp installation path"\php\ext
  3. Kindly ensure you see and keep the files : php_sqlsrv_56_ts.dll and php_pdo_sqlsrv_56_ts.dll
  4. Please delete the redundant files below:

    PHP Drivers License Terms.rtf,
    php_pdo_sqlsrv_54_nts.dll,
    php_pdo_sqlsrv_54_ts.dll,
    php_pdo_sqlsrv_55_nts.dll,
    php_pdo_sqlsrv_55_ts.dll,
    php_pdo_sqlsrv_56_nts.dll,
    php_sqlsrv_54_nts.dll,
    php_sqlsrv_54_ts.dll,
    php_sqlsrv_55_nts.dll,
    php_sqlsrv_55_ts.dll,
    php_sqlsrv_56_nts.dll,
    release.txt,
    SQLSRV_Readme.htm,
    SQLSRV_ThirdPartyNotices.rtf,
    
    • Place these lines in your php.ini at your "xampp installation path"\php\php.ini extension=php_sqlsrv_56_ts.dll extension=php_pdo_sqlsrv_56_ts.dll

    • Restart your XAMPP server and place a '<'?php phpinfo(); ?'>' in an index.php file at \htdocs\'folder'

    • Navigate to it using http://localhost/'folder where phpinfofile is placed'/index.php

If you see something like this image below. It's done, Congratulations

]1

PS : The long answer is here. https://msdn.microsoft.com/en-us/library/cc296170.aspx




回答4:


At this time: My solution was:

1- Download ver 3.2 of the SQLSRV drivers from here. https://www.microsoft.com/download/details.aspx?id=20098

2 Extract the files to your "xampp" folder into the \php\ext

3- Add this lines to php.ini

extension=php_pdo_sqlsrv_56_ts.dll

extension=php_pdo_sqlsrv_56_nts.dll

extension=php_sqlsrv_56_ts.dll

extension=php_sqlsrv_56_nts.dll



来源:https://stackoverflow.com/questions/27126338/xampp-ms-sql-server-php-5-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!