I'm getting this error on macOS trying to connect to a DB. I'm pretty sure it's due to missing drivers but I can't find the relevant ones for High Sierra / 10.13.1 since updating.
Fatal error: Call to undefined function sqlsrv_connect()
I found a guide below: https://github.com/Microsoft/msphpsql
/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"' >>
I'm getting this error on macOS trying to connect to a DB. I'm pretty sure it's due to missing drivers but I can't find the relevant ones for High Sierra / 10.13.1 since updating.
Fatal error: Call to undefined function sqlsrv_connect()
I found a guide below: https://github.com/Microsoft/msphpsql
~/.bash_profile source ~/.bash_profile
However this hasn't helped I'm still getting this error. I can't connect to the DB at all since updating OS. I can't seem to discover what I need. Any ideas?
I'm getting these errors:
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
This wasn't an easy fix, it took a senior several hours.
Basically the gist is that homebrew and many of the commands I found installed several different versions of PHP and the drivers on my system.
They don't follow a logical convention, all the installs were in a different folder structure and in different places.
Essentially all of this had to be removed and then the correct version and driver installed.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.