Skip to Content.
Sympa Menu

freetds - [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 (E-mail)" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] mssql_connect fails with PHP 4.3.4 on RH Linux 9
  • Date: Mon, 1 Dec 2003 15:42:52 -0800

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:

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

=========
PHP 4.3.4
=========
(./configure --with-apxs=/usr/sbin/apxs --with-mssql=/usr/local/freetds
--enable-mssql --enable-debug)

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)

A typical entry from freetds.conf looks like:

[MSSQL1]
host = somehost.domain.com
port = 1433
tds version = 4.2

Please note that TSQL works fine! I can connect to and query all hosts listed
in freetds.conf. It's PHP that's broken. All I get is the wonderfully verbose
message:

Warning: mssql_connect(): Unable to connect to server: MSSQL1 in
/var/www/html/test/include/globals.php on line 116...

That's it. I have tried numerous options with the FreeTDS config.

I should also point out that we use Sybase ASE 11.0 in production. I'm
testing FreeTDS since that Sybase version is unsupported and will not compile
with PHP 4.3.x (unless you know something I don't).

Any advice/sympathy greatly appreciated.

James






Archive powered by MHonArc 2.6.24.

Top of Page