Skip to Content.
Sympa Menu

freetds - connecting to ms sql 6.5 from rh 5.2 with php

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Christophe VG <Christophe.VanGinneken AT tvd.be>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: connecting to ms sql 6.5 from rh 5.2 with php
  • Date: Fri, 28 May 1999 22:12:47 +0200


Hi,

My goal is to get some data from a Microsoft SQL server 6.5, using PHP
3.0.x. So far so good :)
When I looked at the info pages of php I found out I needed to use the
sybase-ct-lib which they also provided online at te php.net site.
Problem : rh5.2 uses libc6, and the sybase-lib uses libc5
Solution : use freeeTDS.
I got it compiled with the php --with-sybase switch (not the sybase-ct
switch as the php-site explained was needed for connectivity to the MS
SQL 6.5).

When I run the following php code :

<?
$cnn = sybase_connect("newton", "test", "test");
$lnk = sybase_select_db("test", $cnn);
$resultset = sybase_query("select * from test", $lnk);
$results = sybase_fetch_array($resultset);
for($i=0;$i<count(results);$i++) echo "$results[$i] ";
sybase_close($cnn);
?>

it seems the connect & the select -functions do work, but when I put in
the query-command, everything just freeze up, and I can wait forever,
without php timing out.

My questions :
1. am I using the right configuration : --tdsver=4.2 &
--with-sybase=/usr/local/freetds ?
2. is there somnething wrong with the php code ?
3. is there perhaps an other solution for me to connect to the sql
server ?

Any ideas are more than welcome.

Tnx in advance,
Christophe VG, Belgium




Archive powered by MHonArc 2.6.24.

Top of Page