Skip to Content.
Sympa Menu

freetds - [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: FreeTDS AT lists.ibiblio.org
  • Subject: [freetds] FreeTDS with PHP On Solaris
  • Date: Thu, 10 Aug 2006 11:49:03 -0400

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 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














Archive powered by MHonArc 2.6.24.

Top of Page