[freetds] FreeTDS installed but Does Not Show In PHP Modules
Wei, Alice J.
ajwei at indiana.edu
Sat Jun 14 07:39:34 EDT 2008
I have recently installed a Linux machine using Fedora so that I could turn it into a web server that hosts mostly PHP pages, while I am intending to connect to an external database server that runs on Microsoft SQL 2005.
I was told to install the product FreeTDS as a fixture to my current problems, which my problems still exist. After I have finished installing Apache and also your program, I was told by the people on the PHP list to install PHP and use the following prompt to configure my PHP.
./configure --with-mssql=/usr/local/freetds --prefix=/usr/local/php
During the configuration process, the machine displayed that it could not find the FreeTDS directory, even though it listed that mssql was configured in the PHP installation. I had configured my freetds to the following:
# A typical Microsoft server
host = 192.168.10.62
port = 1433
tds version = 7.2
I could currently finally use the command line and telnet to the server that hosts the MS SQL database, but when I tried to connect to it using PHP, I still have lines that say I could not connect to the server. If my PHP syntax is accurate,
// connection to the database
$dbhandle = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
// select a database to work with
$selected = mssql_select_db($myDB, $dbhandle)
or die("Couldn't open database $myDB");
Could anyone please tell me what I have done wrong here? Should I install more packages? Or, should I not install my freetds in the /usr/local directory?
I welcome any suggestion.
More information about the FreeTDS