Skip to Content.
Sympa Menu

freetds - Re: [freetds] Re: Connection issue

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Chris parent <kireol AT yahoo.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Re: Connection issue
  • Date: Tue, 14 Jun 2005 06:41:39 -0700 (PDT)

Thank you for the help so far!

TDSDUMPCONFIG=stdout php test.php

----------------------------------------------------
05:36:15.991342 Starting log file for FreeTDS 0.63
on 2005-06-14 05:36:15 with debug level 99.
05:36:15.991443 Attempting to read conf files.
05:36:15.991491 ...$FREETDSCONF not set. Trying
$FREETDS/etc.
05:36:15.991539 ...$FREETDS not set. Trying $HOME.
05:36:15.991648 Failed in reading conf file. Trying
interface files.
05:36:15.991699 Looking for server SYBASE....
05:36:15.991772 Looking for server in
/root/.interfaces.
05:36:15.991821 Searching interfaces file
//root/.interfaces.
05:36:15.991875 Couldn't open /root/.interfaces.
05:36:15.991927 Looking for server in
/etc/freetds/interfaces.
05:36:15.991975 Searching interfaces file
/etc/freetds/interfaces.
05:36:15.992029 Couldn't open /etc/freetds/interfaces.
05:36:15.992078 Setting 'ip_port' to 4000 as a guess.
----------------------------------------------------


Thank you for this line. It showed it doesnt have
$FREETDSCONF set (also $FREETDS). I thought I
installed with the instructions going line by line.
Maybe I missed setting these vars? I do not know how
to set them. How would I do that? Both for my web
environment as well as console.


Also,

ls
/usr/local/lib/php/extensions/no-debug-non-zts-20020429/
gd.so mysql.so
no mssql.so file. Cant even "find" that file on my
system.

ldd /usr/local/bin/php
libcrypt.so.1 => /lib/libcrypt.so.1
(0x40026000)
libpcre.so.0 => /usr/local/lib/libpcre.so.0
(0x40053000)
libsybdb.so.5 => /usr/local/lib/libsybdb.so.5
(0x4007d000)
libresolv.so.2 => /lib/libresolv.so.2
(0x400c6000)
libm.so.6 => /lib/libm.so.6 (0x400d8000)
libdl.so.2 => /lib/libdl.so.2 (0x400fa000)
libnsl.so.1 => /lib/libnsl.so.1 (0x400fd000)
libc.so.6 => /lib/libc.so.6 (0x40112000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2
(0x40000000)


Thanks again!
-=Chris

--- Daniel Fazekas <fdsubs AT t-online.hu> wrote:

>
> On Jun 14, 2005, at 8:31, Chris parent wrote:
>
> > Why is it that tsql command line runs fine but not
> my
> > web PHP version? It's almost as if that the PHP
> > version doesnt know where or how to find my
> > freetds.conf file.
>
> That's likely your problem. Make sure the user
> account the web server
> runs as can access and read your freetds.conf file.
> That usually
> means read rights for other on the freetds.conf file
> and at least
> execute rights on all of its parent directories.
>
> Turning on FreeTDS's logging facilities via the
> TDSDUMPCONFIG
> environment variable might also help, but it's not
> exactly
> straightforward to set that in time in a web server
> environment.
>
> Since you say you can also make it fail on the
> command line, you
> could try:
> TDSDUMPCONFIG=stdout php test.php
>
> Another likely scenario is that you have multiple
> copies of FreeTDS
> on your computer and PHP's mssql extension picked up
> the wrong one,
> one which expects the freetds.conf file in another
> place.
>
> On Linux, you can print shared library dependencies
> with ldd.
> For example, if you compiled php's mssql extension
> as shared:
> ldd
>
/usr/local/lib/php/extensions/no-debug-non-zts-20040412/mssql.so
> Or if it's built-in:
> ldd /usr/local/bin/php
>
> On Mac OS X, you'd have to substitute ldd with otool
> -L
>
> --
> fds
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>




__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html





Archive powered by MHonArc 2.6.24.

Top of Page