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: Tue, 2 Dec 2003 12:10:56 -0800

> From: Daniel Fazekas [mailto:fdsubs AT axelero.hu]
> Sent: Tuesday, December 02, 2003 11:36 AM
> To: FreeTDS Development Group
> Subject: Re: [freetds] mssql_connect fails with PHP 4.3.4 on
> RH Linux 9
>
>
> On Dec 2, 2003, at 0:42, James McGowan wrote:
>
> > I realize that this is probably the most asked type of question on
> > this list, but I really believe it's my combination of
> releases that's
> > got me hosed up, and I haven't read any notes that are
> similar to my
> > setup. Simply put, I can't get PHP to connect to a local
> > Win2000/MSSQLServer box using the following environment:
>
> No, not really, this I believe is a rather common configuration which
> usually "just works." Hence no special notes necessary.
>
> > =============
> > Apache 1.3.27
> > =============
> > A stock install with PHP built as a DSO. Nothing out of the
> ordinary
> > here. Oh, and it's under RedHat Linux 9, I might add.
>
> That's a bit "out of ordinary" as RHL9 shipped with Apache2.
> Not a bad
> idea at all replacing it with 1.3.xx as I believe PHP4 is still
> considered experimental with Apache2, but there's always a
> possibility
> of breaking something in the process of replacing the system provided
> version.

Oh good. You mean I'm doing something right? :)

>
> Could you try a short test without Apache?
>
> Just create a short .php script which doesn't assume it's a web page,
> and test if from the command-line:
>
> php testscript.php
>
>
> > =========
> > PHP 4.3.4
> > =========
> > (./configure --with-apxs=/usr/sbin/apxs
> > --with-mssql=/usr/local/freetds --enable-mssql --enable-debug)
> >
>
> There's no such thing as "--enable-mssql"

Good point, although I've seen it in other folk's configs. I figure it
couldn't hurt. I've recompiled without it since my first post and seen no
effect. And I also corrected the missing hyphen.
>
> > The php.ini file is pretty much the default. Nothing MSSQL-specific
> > added or changed.
> >
> > ==============
> > FreeTDS 0.61.2
> > ==============
> > (./configure --prefix=/usr/local/freetds --enable-msdblib
> > -with-tdsver=7.0 --enable-dbmfix)
>
> What's --enable-dbmfix supposed to do? That's also a
> configure option I
> didn't hear of. It's certainly not listed in the latest freetds
> snapshot. It never hurts trying the latest snapshot if you are having
> problems.

Daniel reports that this is an obsolete switch. I didn't use it in the latest
build.

> Also note that you seem to be missing a hyphen from --with-tdsver, so
> that may not take effect at all. In which case I believe 5.0 is the
> default tdsver, which does not work with MSSQL.
> You're overriding it in freetds.conf anyway, so this shouldn't matter.
>
> > A typical entry from freetds.conf looks like:
> >
> > [MSSQL1]
> > host = somehost.domain.com
> > port = 1433
> > tds version = 4.2
>
> I'd try tds version 8.0 and substituting the numerical IP address
> instead of the host name.

Tried both. No joy.

>
> > Please note that TSQL works fine!
>
> A quick test with sqsh (www.sqsh.org) could be useful too, although
> that uses ct-lib instead of dblib.
>
> > dump file append = /var/log/freetds
> >
> > in freetds.conf for a while now, and again, no logging. Any
> ideas? Box
> > is Intel/RH Linux 9.0.
>
> Are you sure the user apache is running as has write access to that
> file? RH's apache by default uses the "apache" user but, of
> course, you
> replaced RH's copy. :) Apache.org's default may be "nobody".
>
> > Any advice/sympathy greatly appreciated.
>
> If anything you have my sympathy. freetds + php on Linux
> always worked
> on my first try. Other operating systems can be far more problematic.
>
> --
> Daniel
>
> _______________________________________________
> 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