Jump to content

Fatal error: Call to undefined function odbc_connect() in


kat35601

Recommended Posts

I am trying to connect to Microsoft SQL Server but I get  Fatal error: Call to undefined function odbc_connect() in:

connect =odbc_connect("kfm1","sa","removed");
if(!$connect) {
	exit("Connection Failed: " . $connect);
}

I can connect with tsql -S sqlserver -U xxxxxxxxx -P xxxxxxxxx  and with osql -S kfm1 -U xxxxxxxxx -P xxxxxxxxx using the odbc.ini 

 

Below is the setup.

 

Centos 6.8

Cpanel::Easy::Apache v3.32.13 rev9999

PHP 5.5.35

freetds v1.00.13
 
Freetds.conf looks like this
 
[sqlserver]
host = IP address removed
port = 1433
tds version = 8.0
 
 
/*******************/
 
odbc.ini
 
[kfm1]
Driver=FreeTDS
Servername=sqlserver
Database =M1_KF
TDS_Version = 8.0
 
/********************/
 
odbcinst.ini
 
[FreeTDS]
Description     = FreeTDS unixODBC Driver
Driver          = /usr/lib64/libtdsodbc.so
Setup           = /usr/lib64/libtdsS.so
CPTImeout=
COReuse=
FileUsag=1
Trace = Yes
TraceFile = /tmp/sql.log
ForceTrace = Yes
 
/****************************************/
 
 
 
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.