I have used this code to build a bunch of machines to talk with SQL 7.0 .
Basically below :
Go to http://www.freetds.org/ and get the lastest tgz file
http://www.freetds.org/software.html
Compile code for apache
I use this step process if you need an idea.
mod_auth_mysql.sh
mm.sh
openssl.sh
mod_ssl.sh
apache_1.sh
freetds.sh
freetype.sh
zlib.sh
libpng.sh
jpeg-6b.sh
gd.sh
FREETDS.sh
apache_2.sh
as you can see this example talks to Mysql and MsSQL
You will then complete your compile of apache
(apache_2.sh)
Then edit your PHP.ini file :
[Sybase]
sybase.allow_persistent = On ; allow or prevent persistent
link
sybase.max_persistent = -1 ; maximum number of persistent
links. -1 means no limit
sybase.max_links = -1 ; maximum number of links
(persistent+non persistent). -1 means no limit
sybase.interface_file = "/usr/local/freetds/interfaces"
sybase.min_error_severity = 10 ; minimum error severity to
display
sybase.min_message_severity = 10 ; minimum message severity to
display
sybase.compatability_mode = Off ; compatability mode with old
versions of PHP 3.0.
; If on, this will cause PHP to
automatically assign types to results
; according to their Sybase
type, instead of treating them all as
; strings. This compatability
mode will probably not stay around
; forever, so try applying
whatever necessary changes to your code,
; and turn it off.
Now edit your interfaces file for to match your SQL 7.0 box.
<?
function GET_EMAIL($CUSTID)
/*This builds the array of info to be displayed from the Subcribers DB*/
{
$db_conn = mssql_connect("MYSERVER","USERNAME","PASSWORD") or die(
"<strong>ERROR: Connection to MYSERVER failed</strong>" );
mssql_select_db( "master", $db_conn ) or die( "<strong>ERROR: Selecting the
database failed</strong>" );
// $Select_Query = "select distinct(email3) as USEREMAIL from subscribed where
email1 <> 'University' and email3 is not null";
$Select_Query = "select name from systypes";
$query_result = mssql_query($Select_Query) or die( "<strong>ERROR: Query
failed <hr> $Select_Query </strong>" );