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
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.