compiling php with freetds support only compiles sybase support, not mssql support. Most mssql functions will work but mssql_fetch_array accepts 2 arguments, whereas sybase_fetch_array accepts only 1, the second option is ignored and no results are returned if the second argument is MSSQL_ASSOC. This happens with mod_php-4.3.4-r4 and apache-2.0.48-r1. I've tried modifying the ebuilds to provide this support but although i can get freetds to compile with -enable-msdblib as per the php manual i cannot compile php with --with-mssql=/usr. I tried compiling mod_php with freetds in and out of my use variables, both times the error was: In file included from /usr/include/sybfront.h:23, from /usr/include/sqlfront.h:23, from /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:36, from main/internal_functions.c:54: /usr/include/sybdb.h:103: error: syntax error before numeric constant /usr/include/sybdb.h:150: error: syntax error before numeric constant /usr/include/sybdb.h:177: error: syntax error before numeric constant ... In file included from main/internal_functions.c:54: /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:136: error: syntax error before "DBPROCESS" /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:136: warning: no semicolon at end of struct or union /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:138: error: syntax error before '}' token /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:138: warning: data definition has no type or storage class /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:142: error: syntax error before "mssql_link" /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:142: warning: no semicolon at end of struct or union /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:145: error: syntax error before '}' token /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:145: warning: data definition has no type or storage class /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:164: error: syntax error before '*' token /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:184: error: syntax error before "mssql_link" /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:184: warning: no semicolon at end of struct or union /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:185: warning: data definition has no type or storage class /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:191: error: syntax error before '}' token /var/tmp/portage/mod_php-4.3.4-r4/work/php-4.3.4/ext/mssql/php_mssql.h:191: warning: data definition has no type or storage class make: *** [main/internal_functions.lo] Error 1 make: *** Waiting for unfinished jobs.... !!! ERROR: dev-php/mod_php-4.3.4-r4 failed. !!! Function php-sapi_src_compile, Line 450, Exitcode 2 !!! compile problem Reproducible: Always Steps to Reproduce:
This bug appears on bugs.php.net here: http://bugs.php.net/bug.php?id=27363 and here: http://bugs.php.net/bug.php?id=26103 It should be resolved in the imminent 4.3.5 release.