Call to undefined function odbc_connect() php 7

后端 未结 7 1452
轻奢々
轻奢々 2020-11-30 11:27

I\'m testing out php 7 and have come across this error:

Fatal error: Uncaught Error: Call to undefined function odbc_connect()

From the doc page: http://php.

7条回答
  •  执笔经年
    2020-11-30 12:12

    From php.ini file:

    > ; Notes for Windows environments :
    > ;
    > ; - ODBC support is built in, so no dll is needed for it.
    > ; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
    

    But, in PHP 7, ODBC is not by default. Explicit

    extension=odbc
    

    worked for me (new syntax recommended)

    Edit: If your architecture is x64 you must use C:\Windows\SysWOW64\odbcad32.exe instead of C:\Windows\system32\odbcad32.exe

提交回复
热议问题