简体   繁体   English

在Windows和Linux上使用Apache的PHP MSSQL

[英]PHP MSSQL using Apache on Windows and Linux

How to setup PHP (5.3/5.4) with MSSQL support on a windows development environment, if applications should be deployed to a linux system? 如果应将应用程序部署到Linux系统,如何在Windows开发环境中设置具有MSSQL支持的PHP(5.3 / 5.4)? So basically, which driver should be used and how (like using mssql_ functions or PDO or sth.)? 因此,基本上,应该使用哪个驱动程序以及如何使用(例如使用mssql_函数或PDO或sth)?

Currently the target system is running PHP 5.1.6 on some CentOS, but this could be updated if needed. 当前目标系统在某些CentOS上运行PHP 5.1.6,但是可以根据需要进行更新。 We are using the mssql_ functions for database access. 我们正在使用mssql_函数进行数据库访问。 I tried to setup the development machine using XAMPP , but had to find out, that the support for MSSQL driver has been dropped in PHP 5.3. 我尝试使用XAMPP设置开发机器,但是不得不发现,PHP 5.3中已经放弃了对MSSQL驱动程序的支持。

The suggestion seems to be to use sqlsrv driver and functions, but this won't work on the web server. 建议似乎是使用sqlsrv驱动程序和函数,但这在Web服务器上不起作用。

使用ODBC,SQLSrv扩展名仅适用于Windows。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM