|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28007 FreeTDS support will not compile
Submitted: 2004-04-15 10:27 UTC Modified: 2004-07-15 16:54 UTC
From: Assigned: fmk
Status: Closed Package: MSSQL related
PHP Version: 4.3.6RC3 OS: Linux
Private report: No CVE-ID:
 [2004-04-15 10:27 UTC]
See bug #21544 -- I was asked to open a new report.

./configure --with-mssql ...   works, but a make of the same fails with: (see actual result).

FreeTDS version: (debian unstable) 0.53-7

Sniper mentioned that he thinks it's my FreeTDS install. Could be. The attached patch seems to completely fix the problem, though.

As mentioned in the other bug: I'm not a C guy, so I could be way wrong on this. All I know is that after patching, --with-mssql compiles and the library seems to work (as) well (as mssql on linux has ever worked).


Index: ext/mssql/php_mssql.c
RCS file: /repository/php-src/ext/mssql/php_mssql.c,v
retrieving revision
diff -u -r1.86.2.31 php_mssql.c
--- ext/mssql/php_mssql.c       30 Mar 2004 17:54:38 -0000
+++ ext/mssql/php_mssql.c       14 Apr 2004 15:18:18 -0000
@@ -336,7 +336,7 @@
        if (MS_SQL_G(timeout) < 0) MS_SQL_G(timeout) = 60;
-       dbsetmaxprocs((SHORT)MS_SQL_G(max_procs));
+       dbsetmaxprocs((int)MS_SQL_G(max_procs));

        return SUCCESS;

Reproduce code:

Expected result:

Actual result:
ext/mssql/php_mssql.c: In function `zm_activate_mssql':
ext/mssql/php_mssql.c:339: `SHORT' undeclared (first use in this function)
ext/mssql/php_mssql.c:339: (Each undeclared identifier is reported only once
ext/mssql/php_mssql.c:339: for each function it appears in.)
make: *** [ext/mssql/php_mssql.lo] Error 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-15 19:18 UTC]
Assigned to Frank who added the line in question in rev 1.84
of php_mssql.c
 [2004-04-21 01:36 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Older versions of FreeTDS does not define the SHORT type.
 [2004-07-15 01:18 UTC] matt at atopia dot net
This still seems to be an issue with php-4.3.8.  Is the patch shown in this report reliable?

In file included from /usr/archive/source/php-4.3.8/ext/mssql/php_mssql.c:33:
/usr/archive/source/php-4.3.8/ext/mssql/php_mssql.h:41: redefinition of `SHORT'
/usr/local/include/sybdb.h:117: `SHORT' previously declared here
*** Error code 1

Stop in /usr/archive/source/php-4.3.8.
 [2004-07-15 16:54 UTC]
It's fixed in CVS, not in the 4.3.8 distribution bundle.  You need to either (A) Wait for 4.3.9, or (B) Grab a snapshot from

 [2004-07-20 21:02 UTC] anthr4x at spymac dot com
my scenario is this:
Debian 3.0
Apache 1.3.31 + mod_ssl
Freetds 0.62.4
With the lastest snapshot of PHP i CAN compile it againts the freetds (mssql support enabled), but Apache "don't see" the php4_module. I have the httpd.conf configured well:

LoadModule php4_module libexec/
AddType application/x-httpd-php .php

What can be the problem ?

Thaks for all
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 14:01:32 2015 UTC