Skip to Content.
Sympa Menu

freetds - persistent connection

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Sam Sam" <s4m AT lycos.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: persistent connection
  • Date: Tue, 22 Aug 2000 06:42:18 -0700


dear guys and girls.. gee i need your help.. I've compiled freetds with
php-4.0.1pl2 and apache_1.3.12 and imap.. it works but i've to connect with
persistent connection (mssql_pconnect) if I use sybase_connect I can't fetch
the next record.. here is my example code...


$sam=mssql_connect("10.28.1.50","xxx","xxx")mssql_select_db("Database_Db_Web",$sam);
$SQL="select * from Area";
$jes=mssql_query($SQL,$sam);
$baris=mssql_num_rows($jes);
$kolom=mssql_num_fields($jes);
print("Jumlah Baris ".$baris);
print("Jumlah Kolom ".$kolom);


for ($j=0;$j<$baris;$j++) {
for ($sam=0;$sam<$kolom;$sam++){
print($Rs[$sam]."|");
}
$Rs=mssql_fetch_array($jes);
print("<br>");
}

it doesn't work.. but if I change it into mssql_pconnect it works

Anyway i've setup another server, it worked with the mssql_connect.. I used
the same versions...
here is my setup steps:
./configure --prefix=/data/freetds --with-tdsver=4.2
make
make install
export SYBASE=/data/freetds
export LD_LIBRARY_PATH=/data/freetds/lib

in php
./configure --with-apache=../apache_1.3.12 --with-sybase-ct=/data/freetds
--with-mysql --with-imap=/data/imap4.7c/c-client --with-xml
make
make install

in apache
./configure --prefix=/data/apache --activate-module=src/modules/php4/libphp4.a
make
make install

any help, suggestions, ideas would be appreciated...
cause i'm desperated now..

thx




Send your favorite photo with any online greeting!
http://www.whowhere.lycos.com/redirects/americangreetings.rdct

From michael AT tapinternet.com Tue Aug 22 09:58:24 2000
Return-Path: <michael AT tapinternet.com>
Received: from mail.glis.net ([198.88.105.6]) by franklin.oit.unc.edu with
SMTP (Lyris Server version 3.0); Tue, 22 Aug 2000 09:58:18 -0400
Received: from tapinternet.com [198.88.105.31] by mail.glis.net with ESMTP
(SMTPD32-6.00) id A70B3DEC010E; Tue, 22 Aug 2000 09:58:35 -0400
Message-ID: <39A2864B.D82714C8 AT tapinternet.com>
Date: Tue, 22 Aug 2000 09:55:24 -0400
From: Michael Kimsal <michael AT tapinternet.com>
Reply-To: michael AT tapinternet.com
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en,x-ns1TreAn41LNhQ,x-ns2r3109OnmPe2
MIME-Version: 1.0
To: TDS Development Group <freetds AT franklin.oit.unc.edu>
Subject: Re: persistent connection
References:
<LYR112653-73820-2000.08.22-09.42.23--michael#tapinternet.com AT franklin.oit.unc.edu>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Hi Sam,

Did you not have to do the 'msdblib' ?
I've not used the --with-sybase-ct, just --with-sybase. Does
--with-sybase work for you?

Sam Sam wrote:

> dear guys and girls.. gee i need your help.. I've compiled freetds with
> php-4.0.1pl2 and apache_1.3.12 and imap.. it works but i've to connect with
> persistent connection (mssql_pconnect) if I use sybase_connect I can't
> fetch the next record.. here is my example code...
>
> $sam=mssql_connect("10.28.1.50","xxx","xxx")mssql_select_db("Database_Db_Web",$sam);
> $SQL="select * from Area";
> $jes=mssql_query($SQL,$sam);
> $baris=mssql_num_rows($jes);
> $kolom=mssql_num_fields($jes);
> print("Jumlah Baris ".$baris);
> print("Jumlah Kolom ".$kolom);
>
> for ($j=0;$j<$baris;$j++) {
> for ($sam=0;$sam<$kolom;$sam++){
> print($Rs[$sam]."|");
> }
> $Rs=mssql_fetch_array($jes);
> print("<br>");
> }
>
> it doesn't work.. but if I change it into mssql_pconnect it works
>
> Anyway i've setup another server, it worked with the mssql_connect.. I used
> the same versions...
> here is my setup steps:
> ./configure --prefix=/data/freetds --with-tdsver=4.2
> make
> make install
> export SYBASE=/data/freetds
> export LD_LIBRARY_PATH=/data/freetds/lib
>
> in php
> ./configure --with-apache=../apache_1.3.12 --with-sybase-ct=/data/freetds
> --with-mysql --with-imap=/data/imap4.7c/c-client --with-xml
> make
> make install
>
> in apache
> ./configure --prefix=/data/apache
> --activate-module=src/modules/php4/libphp4.a
> make
> make install
>
> any help, suggestions, ideas would be appreciated...
> cause i'm desperated now..
>
> thx
>
> Send your favorite photo with any online greeting!
> http://www.whowhere.lycos.com/redirects/americangreetings.rdct
>
> ---
> You are currently subscribed to freetds as: michael AT tapinternet.com
> To unsubscribe, forward this message to $subst('Email.Unsub')

--
==========================
Michael Kimsal
http://www.tapinternet.com
734-480-9961






Archive powered by MHonArc 2.6.24.

Top of Page