Page 1 of 1

Fatal error: Uncaught Error: Call to undefined function odbc

PostPosted: 11. May 2016 10:27
by alucards
Hi, i have xampp installed ( the version 5.5.34 with PHP 7) on Windows2008 R2 , and when i try to connect to database by ODBC, server says:

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

how I can fix it?

Thanks

Re: Fatal error: Uncaught Error: Call to undefined function

PostPosted: 11. May 2016 11:22
by Nobbie
The PHP ODBC extension is not loaded (i.e. php_odbc.dll). Edit php.ini and look for

Code: Select all
;extension=php_odbc.dll


Remove the semicolon and start Apache again. If there is no such line in php.ini, simply create it on yourself (you will find many similar lines in php.ini) and then restart Apache. If Apache does not start or cannot load php_odbc.dll, look into to the ext-Folder of PHP, if there is such a DLL called php_odbc.dll. If there is no such DLL, Xampp/PHP7 does not support ODBC natively. In that case you should install an older Xampp Version with PHP 5.x

Re: Fatal error: Uncaught Error: Call to undefined function

PostPosted: 16. May 2016 10:56
by alucards
Yes, extension=php_odbc.dll not exist in my php.ini, i put it and work

Thanks!

Re: Fatal error: Uncaught Error: Call to undefined function

PostPosted: 07. June 2016 04:27
by andrykur
alucards wrote:Yes, extension=php_odbc.dll not exist in my php.ini, i put it and work

Thanks!


can you help me ? when i put it i found error went to access localhost, the display instead ask for download php file of the localhost
i use xampp 1.8.1.1 for linux