D
D
direx2016-05-23 03:19:31
linux
direx, 2016-05-23 03:19:31

Ubuntu 16.04 mssql on php7 real?

Goodnight.
It so happened that I updated to 16.04. I have installed php7. On the old 5.6 mssql worked without problems. And now, when connecting to Laravel, it gives the following error:

PDOException]                                                                                    
  SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist (severity 9)

Piece of php.ini:
;extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_exif.dll      ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
;extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll

Googled. In response, I received freetds. Installed this miracle, configured the section with the server. Same error.
[10.0.18.100]
  host = 10.0.18.100
  client charset = UTF-8
  tds version = 7.3
  instance = SQLEXPRESS ;  с port тоже пытался

Today is already Monday, and the work will not stand (Thank you!
Solutions to the issue:
enter into the console:
tsql -C
We get something like the following:
Version: freetds v0.91
 freetds.conf directory: /usr/local/etc
 MS db-lib source compatibility: yes
 ....

We are only interested in: freetds.conf directory. This is the directory where freetds.conf is located. The fact is that there can be several configuration files !!!! (this is my mistake)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Satisfied IT, 2016-05-23
@ponich

Try to do like in this article

D
direx, 2016-05-23
@ponich

Solutions to the issue:
enter into the console:
We get something like the following:

Version: freetds v0.91
 freetds.conf directory: /usr/local/etc
 MS db-lib source compatibility: yes
 ....

We are only interested in: freetds.conf directory. This is the directory where freetds.conf is located. The fact is that there can be several configuration files !!!! (this is my mistake)

I
index0h, 2016-05-23
@index0h

Raise the environment under Vagrant and you will not have such garbage)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question