Skip to Content.
Sympa Menu

freetds - Re: 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: Brian Bruns <camber AT umcc.ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: connecting to ms sql 6.5 from rh 5.2 with php
  • Date: Fri, 28 May 1999 17:49:22 -0400 (EDT)


By chance does the table you are selecting from have a smalldatetime
column??? I found this problem yesterday, but have not checked in in yet.
The problem is it thinks datetime4 is 8 bytes long and over reads the
input stream and ends up with a blocking read call.

I should have the new stuff checked into CVS tonight...and I'll do some
testing against PHP this weekend. I have alot of changes ready, so things
may be a little unstable for a few days.

Brian

On Fri, 28 May 1999, Christophe VG wrote:

> 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
>
> ---
> You are currently subscribed to freetds as: camber AT ais.org
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
>





Archive powered by MHonArc 2.6.24.

Top of Page