首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >致命错误:对未定义函数sqlsrv_connect()的调用

致命错误:对未定义函数sqlsrv_connect()的调用
EN

Stack Overflow用户
提问于 2017-11-23 16:31:11
回答 1查看 1.6K关注 0票数 0

在试图连接到DB的macOS上,我得到了这个错误。我很确定这是由于司机失踪,但我找不到相关的高塞拉利昂/ 10.13.1,因为更新。

Fatal error: Call to undefined function sqlsrv_connect()

我在下面找到了一个指南:https://github.com/Microsoft/msphpsql

代码语言:javascript
复制
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap 
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php71 --with-pear --with-httpd24 --with-cgi
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/bin:$PATH"' >>  

在试图连接到DB的macOS上,我得到了这个错误。我很确定这是由于司机失踪,但我找不到相关的高塞拉利昂/ 10.13.1,因为更新。

致命错误:调用未定义函数sqlsrv_connect()

我在下面找到了一个指南:https://github.com/Microsoft/msphpsql

~/..bash_profile源~/..bash_profile

然而,这并没有帮助我,我仍然得到了这个错误。自从更新操作系统后,我根本无法连接到DB。我似乎无法发现我需要什么。有什么想法吗?

我发现了这些错误:

代码语言:javascript
复制
Warning: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
Warning: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.
Warning: homebrew/php/php70 7.0.25_17 is already installed

Error: Formulae found in multiple taps:
       * microsoft/msodbcsql/msodbcsql
       * microsoft/mssql-release/msodbcsql

Please use the fully-qualified name e.g. microsoft/msodbcsql/msodbcsql to refer the formula.
Error: Formulae found in multiple taps:
       * microsoft/msodbcsql/mssql-tools
       * microsoft/mssql-release/mssql-tools

Please use the fully-qualified name e.g. microsoft/msodbcsql/mssql-tools to refer the formula.
Warning: autoconf 2.69 is already installed

574: module php7_module is already loaded, skipping
httpd not running, trying to start
EN

回答 1

Stack Overflow用户

发布于 2017-11-30 14:33:33

这不是一个容易的解决办法,它花了几个小时的高年级。

基本上,要点是我找到的自制和许多命令安装了几个不同版本的PHP和我的系统上的驱动程序。

它们不遵循逻辑约定,所有安装都位于不同的文件夹结构和不同的位置。

基本上,所有这些都必须删除,然后才能安装正确的版本和驱动程序。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47459911

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档