Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS with PHP On Solaris

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Frank, Ryan W" <ryan.w.frank AT bankofamerica.com>
  • To: "Frank M. Kromann" <frank AT kromann.info>, FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS with PHP On Solaris
  • Date: Thu, 10 Aug 2006 16:32:26 -0400

Awesome!

I did what you suggested:

Recompiled FreeTDS without the --enable-sybase-compat, upgraded to PHP
5.1.4, and in the compile for the new PHP version I did
--with-mssql=/usr/local/freetds...

Works like a champ now!

Thanks for your help...

-Ryan

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Frank M. Kromann
Sent: Thursday, August 10, 2006 3:35 PM
To: FreeTDS Development Group
Cc: FreeTDS AT lists.ibiblio.org
Subject: Re: [freetds] FreeTDS with PHP On Solaris

Hi Ryan,

I would try to compile FreeTDS without --enable-sybase-compat and then
compile PHP unsing --with-mssql. That will give you access to all the
mssql_* functions. The sybase extension only implements a few mssql_*
aliases.

Upgrading PHP to the 5.1.x branch would also be a good idea but that has
nothing to do with your problem.

- Frank

> Hello all!
>
> I am having trouble with my installation of FreeTDS running on my
> Solaris box. Here is my configuration:
>
> Microsoft SQL: Version Microsoft SQL Server Release 8.0
>
> Solaris 9
> Kernel: Generic_117171-07
>
> FreeTDS 0.64
> CONFIGURE: configure --prefix=/usr/local/freetds --enable-msdblib
> --enable-sybase-compat --with-openssl=/usr/local/ssl
>
> PHP 5.0.4
> CONFIGURE: configure --prefix=/usr/local/php-5.0.4
> --with-sybase=/usr/local/freetds
> --with-apache=/export/build/apache_1.3.27
> --with-openssl=/usr/local/ssl --with-mysql=/usr/local/mysql
>
> Apache 1.3.27
> CONFIGURE: configure --prefix=/usr/local/apache
> --activate-module=src/modules/php5/libphp5.a
>
> I have created my /usr/local/freetds/interfaces file, and set my
> environment variables... I can run TSQL tests and get the 1> prompt
> every time. I can write basic PHP queries to get data and display it
>
> EXAMPLE (Working):
>
> $sql = "SELECT NewHireNBID, ConfUserFName, ConfUserLName from NewHire
> WHERE RequestID = '123386'"
>
> print("NOTE: executing $sql<br>");
> $result=mssql_query($sql, $con);
> print("NOTE: done executing $sql<br>");
>
> As you can see I am not doing anything with the data yet, just simply
> printing when I begin and printing when I finish the query...
>
> I know there are 19783 entries in this table... When I try to get any
> more specific than one row the query never finishes...
>
> EXAMPLE (Not working):
>
> $sql = "SELECT NewHireNBID, ConfUserFName, ConfUserLName from NewHire
> WHERE RequestID BETWEEN '123386' AND '123419'"
>
> print("NOTE: executing $sql<br>");
> $result=mssql_query($sql, $con);
> print("NOTE: done executing $sql<br>");
>
> Now, I have run this query against the DB and I should get 3 rows
> back... however this query will just sit... and sit... until it
> eventually times out... I have read the documentation regarding slow
> response... I have checked for the dump file, and it's
configuration...
> just to make sure I wasn't missing anything I set it up to dump
thinking
> I might find something useful... It works, the dump file gets to like
> 40+mb I stop the query... I don't feel DNS is an issue as it works
> 40+just
> fine for a specific query... Plus I can forward and reverse the server

> form this host all day with no issues...
>
> Here a snapshot of what I get in the log file:
>
> dblib.c:1433:dbnextrow()
> dblib.c:1447:dbnextrow() dbresults_state = 2 dblib.c:1509:leaving
> dbnextrow() returning -3
> dblib.c:2480:dbdatlen() type = 39
> dblib.c:2486:leaving dbdatlen() returning 7
> dblib.c:2480:dbdatlen() type = 39
> dblib.c:2486:leaving dbdatlen() returning 7
> dblib.c:2480:dbdatlen() type = 39
> dblib.c:2486:leaving dbdatlen() returning 6
> dblib.c:2480:dbdatlen() type = 39
> dblib.c:2486:leaving dbdatlen() returning 6
> dblib.c:2480:dbdatlen() type = 39
> dblib.c:2486:leaving dbdatlen() returning 5
> dblib.c:2480:dbdatlen() type = 39
> dblib.c:2486:leaving dbdatlen() returning 5
> dblib.c:1433:dbnextrow()
> dblib.c:1447:dbnextrow() dbresults_state = 2 dblib.c:1509:leaving
> dbnextrow() returning -3
> dblib.c:2480:dbdatlen() type = 39
> dblib.c:2486:leaving dbdatlen() returning 7
> dblib.c:2480:dbdatlen() type = 39
> dblib.c:2486:leaving dbdatlen() returning 7
> dblib.c:2480:dbdatlen() type = 39
> dblib.c:2486:leaving dbdatlen() returning 6
> dblib.c:2480:dbdatlen() type = 39
> dblib.c:2486:leaving dbdatlen() returning 6
> dblib.c:2480:dbdatlen() type = 39
> dblib.c:2486:leaving dbdatlen() returning 5
> dblib.c:2480:dbdatlen() type = 39
> dblib.c:2486:leaving dbdatlen() returning 5
>
> I am stuck as to what I should look at next? It works fine on the
simple
> query but not anything that returns more than one row...
>
> Any ideas?
>
> -Ryan
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>



_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page