Hello,
We are trying to connect to sqlserver residing in a windows system from linux system through PHP.
For that We had installed freetds by downloading from [url]www.freetds.com[/url] a file named freetds-0.61.tgz using the following options,
./configure --prefix=/usr/local/freetds --with tdsver=7.0 --enable-msdblib --enable-dbmfix --with gnu-ld --enable-shared --enable-static
make
make install
Then We have installed Php4.3.3 under RedHat Linux 7.2 using the dollowing options,
./configure --with-sybase=/usr/local/freetds
make
make install
Then set the environment variable SYBASE as /usr/local/freetds in /etc/profiles.
Then written a small code in php (test.php)
<html>
<body>
<h1> hi </h1>
<?php
//putenv("SYBASE=/usr/local/freetds");
putenv("TDSVER=70");
echo("Testing");
$mstest= mssql_connect("myserver" , "nuvi" , "nuvi" );
?>
</body>
</html>
Tried loading it then returned an error message...
Fatal error: Call to undefined function: mssql_connect() in /var/www/html/test.php
Later we umcommented the putenv("SYBASE=/usr/local/freetds"); from test.php
but still the same error.
Later added /usr/local/freetds/lib in /etc/ld.so.conf file.
but still the same error.
Later in apachectl file added codes,
LD_LIBRARY_PATH=/usr/local/freetds/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
SYBASE=/usr/local/freetds; export SYBASE
but no change in error message.
In freetds.conf file
[myserver]
host=192.168.0.4
port=1433
tds version=7.0
But we are getting the same error.
Can anybody please help us to solve this problem.
my email id is [email]vinu@amstorindia.com[/email]
with regards
vinu