简体   繁体   English

Ubuntu PHP和sqlsrv_connect()

[英]Ubuntu PHP and sqlsrv_connect()

I'm using a class that uses sqlsrv_connect() in PHP to connect to a MSSQL database server, but I always get this error: 我正在使用一个在PHP中使用sqlsrv_connect()连接到MSSQL数据库服务器的类,但我总是收到此错误:

Fatal error: Call to undefined function sqlsrv_connect()

I've done multiple install methods such as: 我已经完成了多种安装方法,例如:

sudo apt-get install -y freetds-bin freetds-common tdsodbc odbcinst unixodbc php5-sybase

Restarted apache but none of them seem to solve the problem of the libraries being added. 重新启动了apache但它们似乎都没有解决添加库的问题。 Can help give some guidance on the problem? 可以帮忙就问题提供一些指导吗?

I'm using: 我正在使用:

PHP 5.3.10-1ubuntu3.1 with Suhosin-Patch (cli) (built: May  4 2012 02:20:36) 

Linux based PHP does not support the sqlsrv_* functions. 基于Linux的PHP不支持sqlsrv_*函数。 Those are only provided by the Windows driver. 这些仅由Windows驱动程序提供。 FreeTDS will provide you with access to the old mssql_* functions. FreeTDS将为您提供对旧mssql_*函数的访问。

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

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