Re: unable to use odbc_connect method in linux

From: Date: Tue, 23 Sep 2014 12:37:39 +0000
Subject: Re: unable to use odbc_connect method in linux
References: 1  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-19971@lists.php.net to get a copy of this message
Sharikant Jaiswal wrote: > I have to connect my php application with SQL server. > > I deployed application in XAMPP server under my linux box. > > I installed unixODBC on the system and I am able to connect with database > using sqlcmd command from command line. > > I am getting fatal error in odbc_connect on linux but its working fine on > windows. > > I think that there is an issue in use of odbc_connect function that's why my > php application is not communicating with database. > > My browser shows the following error: > > Fatal error: Call to undefined function on odbc_connect() in > /opt/lamp/..xyz.php on line 47 It seems that the ODBC extension[1] is not installed on your Linux machine. However, I wonder why you don't use PDO[2]? BTW: this mailing list (php-webmaster@lists.php.net) is a "List for discussing and maintaining the php.net web infrastructure." Please use a more appropriate list for support questions[3]. [1] <http://php.net/manual/en/book.uodbc.php#book.uodbc> [2] <http://php.net/manual/en/book.pdo.php> [3] <http://php.net/support.php> -- Christoph M. Becker

« previous php.webmaster (#19971) next »