Php/docs/odbc.configuration
Runtime Configuration
The behaviour of these functions is affected by settings in php.ini
.
Name | Default | Changeable | Changelog |
---|---|---|---|
odbc.default_db * | NULL | PHP_INI_ALL | |
odbc.default_user * | NULL | PHP_INI_ALL | |
odbc.default_pw * | NULL | PHP_INI_ALL | |
odbc.allow_persistent | "1" | PHP_INI_SYSTEM | |
odbc.check_persistent | "1" | PHP_INI_SYSTEM | |
odbc.max_persistent | "-1" | PHP_INI_SYSTEM | |
odbc.max_links | "-1" | PHP_INI_SYSTEM | |
odbc.defaultlrl | "4096" | PHP_INI_ALL | |
odbc.defaultbinmode | "1" | PHP_INI_ALL | |
odbc.default_cursortype | "3" | PHP_INI_ALL | Available as of PHP 5.3.0 |
Note:
Entries marked with * are not implemented yet.
For further details and definitions of the PHP_INI_* modes, see the Where a configuration setting may be set. Here's a short explanation of the configuration directives.
odbc.default_db
stringODBC data source to use if none is specified in odbc_connect() or odbc_pconnect().
odbc.default_user
stringUser name to use if none is specified in odbc_connect() or odbc_pconnect().
odbc.default_pw
stringPassword to use if none is specified in odbc_connect() or odbc_pconnect().
odbc.allow_persistent
boolWhether to allow persistent ODBC connections.
odbc.check_persistent
boolCheck that a connection is still valid before reuse.
odbc.max_persistent
intThe maximum number of persistent ODBC connections per process.
odbc.max_links
intThe maximum number of ODBC connections per process, including persistent connections.
odbc.defaultlrl
intHandling of LONG fields. Specifies the number of bytes returned to variables. See odbc_longreadlen() for details.
When an int is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used.
odbc.defaultbinmode
intHandling of binary data. See odbc_binmode() for details.
odbc.default_cursortype
intControls the ODBC cursor model. Possible values are
SQL_CURSOR_FORWARD_ONLY
,SQL_CURSOR_KEYSET_DRIVEN
,SQL_CURSOR_DYNAMIC
andSQL_CURSOR_STATIC
(default).