Skip to Content.
Sympa Menu

freetds - RE: [freetds] mssql_connect fails with PHP 4.3.4 on RH Linux 9

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James McGowan" <jmcgowan AT luxurylink.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] mssql_connect fails with PHP 4.3.4 on RH Linux 9
  • Date: Thu, 4 Dec 2003 14:51:52 -0800

Ah, my long-suffering pal Daniel... now that I've actually followed your
advice, I think we have some clues.

> From: Daniel Fazekas [mailto:fdsubs AT axelero.hu]
> Sent: Wednesday, December 03, 2003 6:23 PM
> To: FreeTDS Development Group
> Subject: Re: [freetds] mssql_connect fails with PHP 4.3.4 on
> RH Linux 9
>
[snip]
> Ouch. I though it would be obvious enough that I was implying testing
> mssql connectivity. :)
[snip]
>
> This would
> - take Apache out of the equation for now
> - definitely enable you to get the freetds logging work
>
> You could just open your shell and type
>
> TDSDUMP=freetds.log php testscript.php
>
> ..and you get that log file right there in the current working
> directory. You don't even need to change your freetds.conf
> file or any other configuration file.

OK, I created a simple PHP script with a simple SQL query. When run as root,
the log file fills with fascinating info and the correct result is returned.
However, when run from the nobody account (or from my own login), the log
contains only these lines:

Starting log file for FreeTDS 0.61.2 with debug level 99.
2003-12-04 14:38:11.085284 iconv will convert client-side data to the ""
character set
2003-12-04 14:38:11.085732 IP address pointer is NULL
2003-12-04 14:38:11.085796 Server LIVE not found!

The relevant portion of my freetds.conf file is as follows:

[LIVE]
host = 209.151.xxx.xxx
port = 1433
tds version = 7.0

And, yes, the IP is dummied up... :)

So, it's obviously related to who's invoking PHP, but why?

As always, my sincerest thanks!

Jim




Archive powered by MHonArc 2.6.24.

Top of Page