mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Fixed bug #68964 Allowed memory size exhausted with odbc_exec
This is done in two steps: - the ODBCVER has to be rased to 0x0300 which corresponds to Sql Server 9, otherwise the client will not recognize several SQL datatypes - additionally the config scripts was tweaked so then ODBCVER can be overridden, that still allows enabling compatibility with lower versions Bug #67437 might be fixed by this as well.
This commit is contained in:
parent
9ef0c39b2b
commit
a41aa46759
4 changed files with 20 additions and 8 deletions
|
@ -490,6 +490,19 @@ PHP_ARG_WITH(dbmaker,,
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PHP_ARG_WITH(odbcver,,
|
||||||
|
[ --with-odbcver[=HEX] Force support for the passed ODBC version. A hex number is expected, default 0x0300.
|
||||||
|
Use the special value of 0 to prevent an explicit ODBCVER to be defined. ], 0x0300)
|
||||||
|
|
||||||
|
if test "no" != "$PHP_ODBCVER"; then
|
||||||
|
if test "$PHP_ODBCVER" != "0"; then
|
||||||
|
AC_DEFINE_UNQUOTED(ODBCVER, $PHP_ODBCVER, [ The highest supported ODBC version ])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
AC_DEFINE(ODBCVER, 0x300, [ The highest supported ODBC version ])
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Extension setup
|
dnl Extension setup
|
||||||
dnl
|
dnl
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// vim:ft=javascript
|
// vim:ft=javascript
|
||||||
|
|
||||||
ARG_ENABLE("odbc", "ODBC support", "yes");
|
ARG_ENABLE("odbc", "ODBC support", "yes");
|
||||||
|
ARG_WITH("odbcver", "Force support for the passed ODBC version. A hex number is expected, default 0x0300. Use the special value of 0 to prevent an explicit ODBCVER to be defined.");
|
||||||
|
|
||||||
if (PHP_ODBC == "yes") {
|
if (PHP_ODBC == "yes") {
|
||||||
if (CHECK_LIB("odbc32.lib", "odbc") && CHECK_LIB("odbccp32.lib", "odbc")
|
if (CHECK_LIB("odbc32.lib", "odbc") && CHECK_LIB("odbccp32.lib", "odbc")
|
||||||
|
@ -9,8 +10,13 @@ if (PHP_ODBC == "yes") {
|
||||||
&& CHECK_HEADER_ADD_INCLUDE("sqlext.h", "CFLAGS_ODBC")) {
|
&& CHECK_HEADER_ADD_INCLUDE("sqlext.h", "CFLAGS_ODBC")) {
|
||||||
EXTENSION("odbc", "php_odbc.c");
|
EXTENSION("odbc", "php_odbc.c");
|
||||||
AC_DEFINE("HAVE_UODBC", 1, "ODBC support");
|
AC_DEFINE("HAVE_UODBC", 1, "ODBC support");
|
||||||
|
if ("no" == PHP_ODBCVER) {
|
||||||
|
AC_DEFINE("ODBCVER", "0x0300", "The highest supported ODBC version", false);
|
||||||
|
} else if ("0" != PHP_ODBCVER) {
|
||||||
|
AC_DEFINE("ODBCVER", PHP_ODBCVER, "The highest supported ODBC version", false);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
WARNING("odbc support can't be enabled, libraries or header are missing (SDK)")
|
WARNING("odbc support can't be enabled, libraries or header are missing (SDK)")
|
||||||
PHP_ODBC = "no"
|
PHP_ODBC = "no"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#define PHP_ODBC_H
|
#define PHP_ODBC_H
|
||||||
|
|
||||||
#if HAVE_UODBC
|
#if HAVE_UODBC
|
||||||
#define ODBCVER 0x0250
|
|
||||||
|
|
||||||
#ifdef ZTS
|
#ifdef ZTS
|
||||||
#include "TSRM.h"
|
#include "TSRM.h"
|
||||||
|
|
|
@ -25,12 +25,6 @@
|
||||||
|
|
||||||
#if HAVE_UODBC
|
#if HAVE_UODBC
|
||||||
|
|
||||||
#define ODBCVER 0x0250
|
|
||||||
/*#ifndef MSVC5
|
|
||||||
#define FAR
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* checking in the same order as in configure.in */
|
/* checking in the same order as in configure.in */
|
||||||
|
|
||||||
#if defined(HAVE_SOLID) || defined(HAVE_SOLID_30) || defined(HAVE_SOLID_35) /* Solid Server */
|
#if defined(HAVE_SOLID) || defined(HAVE_SOLID_30) || defined(HAVE_SOLID_35) /* Solid Server */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue