How to enable odbc in XAMPP linux [duplicate]

左心房为你撑大大i 提交于 2019-12-23 02:26:06

问题


I am working on a php application in which for database connection I am using odbc.
The code is working properly in windows but when I tried the same code in Linux I am facing

Fatal Error Undefined Function odbc_connect()

I think this error occurs because odbc is not enabled on XAMPP.

Please advoice me how to enable odbc in XAMPP under Linux.

Thanks in advance


回答1:


Know this is an old one, but in case somebody else is looking...

I had this same issue with my XAMPP setup. If you open your php.ini file, via the XAMPP Control Panel, do a search for this line: ;extension=php_pdo_odbc.dll

Beneath it, paste in the following: extension=php_odbc.dll and you should be good to go.

Interesting that the comments for that section state "Note that ODBC support is built in, so no dll is needed for it." As an aside, you might also need to restart Apache from the XAMPP Control Panel.



来源:https://stackoverflow.com/questions/26034575/how-to-enable-odbc-in-xampp-linux

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!