I have Red Hat 9. Anyone here have that too and can help me?
Without having to do a lot of major surgery, such as recompiling my
PHP (which I consider risky), I want to use either unixODBC or FreeTDS
to connect RH9 Linux to MS SQL Server 2000.
I noticed from phpinfo() that FreeTDS wasn't configured into the PHP
install, although I have installed FreeTDS just now. That's probably
why the mssql_connect() call won't connect -- says Call to undefined
function. I probably need to recompile PHP (again, risky) in order to
get this to work. However, I *DID* notice that unixODBC was enabled,
so I wanted to connect with that using this code:
$dsn = "Driver={SQL Server};Server=10.22.109.5;Database=pubs";
$user = 'sa';
$pass = 'password';
$link = odbc_cconnect($dsn, $user, $pass);
$sql = 'SELECT * FROM authors';
$q = odbc_exec($link, $sql);
$rec = odbc_fetch_array($q);
echo $rec['au_lname'];
odbc_free_result($q);
Well, again, it says Call to undefined function odbc_connect().
What's the catch? Is there a simple way out of this?