Skip to content

Instantly share code, notes, and snippets.

@KalleZ
Created June 26, 2018 19:30
Show Gist options
  • Save KalleZ/b7cc6c737801ed60c7fe793ae628b0b8 to your computer and use it in GitHub Desktop.
Save KalleZ/b7cc6c737801ed60c7fe793ae628b0b8 to your computer and use it in GitHub Desktop.
diff --git a/ext/pdo_odbc/pdo_odbc.c b/ext/pdo_odbc/pdo_odbc.c
index 0ff71a0cf8..6b31eecf7e 100644
--- a/ext/pdo_odbc/pdo_odbc.c
+++ b/ext/pdo_odbc/pdo_odbc.c
@@ -68,11 +68,6 @@ zend_ulong pdo_odbc_pool_on = SQL_CP_OFF;
zend_ulong pdo_odbc_pool_mode = SQL_CP_ONE_PER_HENV;
#endif
-#if defined(DB2CLI_VER) && !defined(PHP_WIN32)
-PHP_INI_BEGIN()
- PHP_INI_ENTRY("pdo_odbc.db2_instance_name", NULL, PHP_INI_SYSTEM, NULL)
-PHP_INI_END()
-
#endif
/* {{{ PHP_MINIT_FUNCTION */
@@ -86,23 +81,6 @@ PHP_MINIT_FUNCTION(pdo_odbc)
return FAILURE;
}
-#if defined(DB2CLI_VER) && !defined(PHP_WIN32)
- REGISTER_INI_ENTRIES();
- {
- char *instance = INI_STR("pdo_odbc.db2_instance_name");
- if (instance) {
- char *env = malloc(sizeof("DB2INSTANCE=") + strlen(instance));
- if (!env) {
- return FAILURE;
- }
- strcpy(env, "DB2INSTANCE=");
- strcat(env, instance);
- putenv(env);
- /* after this point, we can't free env without breaking the environment */
- }
- }
-#endif
-
#ifdef SQL_ATTR_CONNECTION_POOLING
/* ugh, we don't really like .ini stuff in PDO, but since ODBC connection
* pooling is process wide, we can't set it from within the scope of a
@@ -144,9 +122,6 @@ PHP_MINIT_FUNCTION(pdo_odbc)
*/
PHP_MSHUTDOWN_FUNCTION(pdo_odbc)
{
-#if defined(DB2CLI_VER) && !defined(PHP_WIN32)
- UNREGISTER_INI_ENTRIES();
-#endif
php_pdo_unregister_driver(&pdo_odbc_driver);
return SUCCESS;
}
@@ -165,10 +140,6 @@ PHP_MINFO_FUNCTION(pdo_odbc)
php_info_print_table_row(2, "ODBC Connection Pooling", "Not supported in this build");
#endif
php_info_print_table_end();
-
-#if defined(DB2CLI_VER) && !defined(PHP_WIN32)
- DISPLAY_INI_ENTRIES();
-#endif
}
/* }}} */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment