Fatal error: Uncaught Error: Call to undefined function odbc

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Fatal error: Uncaught Error: Call to undefined function odbc

Postby alucards » 11. May 2016 10:27

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
alucards
 
Posts: 2
Joined: 11. May 2016 10:21
XAMPP version: 5.5.34
Operating System: Windows 2008 r2

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

Postby Nobbie » 11. May 2016 11:22

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
Nobbie
 
Posts: 8772
Joined: 09. March 2008 13:04

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

Postby alucards » 16. May 2016 10:56

Yes, extension=php_odbc.dll not exist in my php.ini, i put it and work

Thanks!
alucards
 
Posts: 2
Joined: 11. May 2016 10:21
XAMPP version: 5.5.34
Operating System: Windows 2008 r2

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

Postby andrykur » 07. June 2016 04:27

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
andrykur
 
Posts: 2
Joined: 07. June 2016 03:58
XAMPP version: 1.8.1.1
Operating System: Centos 6.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 93 guests