php8.5
Home/ Manual/ sqlsrv / functions/ sqlsrv_configure

sqlsrv_configure

PHP function Edit on GitHub ✎

Changes the driver error handling and logging configurations

Description

sqlsrv_configure(string $setting, mixed $value): bool

Changes the driver error handling and logging configurations.

Parameters

setting

The name of the setting to set. The possible values are "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity".

value

The value of the specified setting. The following table shows possible values:

SettingOptions
WarningsReturnAsErrors1 (true) or 0 (false)
LogSubsystemsSQLSRV_LOG_SYSTEM_ALL (-1) SQLSRV_LOG_SYSTEM_CONN (2) SQLSRV_LOG_SYSTEM_INIT (1) SQLSRV_LOG_SYSTEM_OFF (0) SQLSRV_LOG_SYSTEM_STMT (4) SQLSRV_LOG_SYSTEM_UTIL (8)
LogSeveritySQLSRV_LOG_SEVERITY_ALL (-1) SQLSRV_LOG_SEVERITY_ERROR (1) SQLSRV_LOG_SEVERITY_NOTICE (4) SQLSRV_LOG_SEVERITY_WARNING (2)

Return Values

Success

See Also

  • SQLSRV Error Handling.
  • Logging SQLSRV Activity.

Source: reference/sqlsrv/functions/sqlsrv-configure.xml · from the official PHP manual (php/doc-en)