略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: 运行时配置

2024-04-27

运行时配置

这些函数的行为受 php.ini 中的设置影响。

The following table lists the configuration options available in the SQLSRV extension. For more information about these options, see » Handling SQLSRV Warnings and Errors.

SQLSRV 配置选项
名字 默认 可修改范围 Changelog
sqlsrv.WarningsReturnAsErrors 1 (true) PHP_INI_ALL Available since SQLSRV 1.0
sqlsrv.LogSubsystems 0 PHP_INI_ALL Available since SQLSRV 1.0
sqlsrv.LogSeverity 1 PHP_INI_ALL Available since SQLSRV 1.0
add a noteadd a note

User Contributed Notes 2 notes

up
0
baklanoid at gmail dot com
1 year ago
Hey-ho wayfarer! Here is some assembly i did, you may find it useful in your php.ini file :)

[sqlsrv]
; By default, the SQLSRV driver treats warnings as errors;
; a call to a sqlsrv function that generates
; an error or a warning returns false.
sqlsrv.WarningsReturnAsErrors = 1

; By default, errors and warnings that are generated by
; the Microsoft Drivers for PHP for SQL Server are not logged
; LogSubsystems can be one of the following values:
; -1 - Turns on logging of all subsystems.
;  0 - Turns logging off (This is the default).
;  1 - Turns on logging of initialization activity.
;  2 - Turns on logging of connection activity.
;  4 - Turns on logging of statement activity.
;  8 - Turns on logging of error functions activity (such as handle_error and handle_warning).
; These values may be combined with logical OR,
; for example, 6 - connection + statement
sqlsrv.LogSubsystems = -1

; LogSeverity can be one of the following values
; (LOGGING ACTIVITY USING THE PDO_SQLSRV DRIVER):
; -1 - Specifies that errors, warnings, and notices are logged.
;  0 - Logging is disabled (This is the default).
;  1 - Specifies that errors are logged.
;  2 - Specifies that warnings are logged.
;  4 - Specifies that notices are logged.
; Logging information is added to the error_log (php_errors.log) file.
; These values may be combined with logical OR,
; for example, 3 - errors + warnings
sqlsrv.LogSeverity = 1
up
-18
robert dot urbanski2 at gmail dot com
5 years ago
Do not omitt these parameters

client_buffer_max_kb_size = '50240'
sqlsrv.ClientBufferMaxKBSize = 50240

官方地址:https://www.php.net/manual/en/sqlsrv.configuration.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3