Skip to Content.
Sympa Menu

freetds - [freetds] FreeTDS XAMPP Install - cannot connect via PHP

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Rick Bates <rick AT inetdog.com>
  • To: "freetds AT lists.ibiblio.org" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] FreeTDS XAMPP Install - cannot connect via PHP
  • Date: Wed, 14 Sep 2011 23:47:05 -0400

I can successfully connect to the database using isql command from the shell.
But when I try to connect via php using the odbc_connect method and the same
dsn, I get this: Fatal error: Call to undefined function odbc_connect() in
/opt/lampp/htdocs/includes/db_login.inc on line 8

I installed PHP ODBC but I do not see any reference to odbc in the php-info()
page. I am wondering if the config files are in the wrong directory to be
used by php. They are in /etc as per the default install and online
instructions. But I also see that in XAMPP, the root directory is
/opt/lampp. So I don't know if I need to build them in the /opt/lampp/etc
directory to make them work?

Also, when I put the extension=odbc.so directive in the php.ini in the
/opt/lampp/etc directory I get an error starting and stopping XAMPP
indicating that it cannot find that file. But it does not error with that
line in the php.ini in the /etc. directory.

Any help would be greatly appreciated!





Archive powered by MHonArc 2.6.24.

Top of Page