Releases: microsoft/msphpsql
4.1.3 - Windows - Preview
With this release we are excited to announce preview support for PHP 7.1 RC. This release also includes some bug fixes:
- Fixed issue #139 : sqlsrv_fetch_object calls custom class constructor in static context and outputs an error.
Thanks,
SQL Server Engineering Team
4.0.5 - Linux - Preview
We are excited to announce that PECL packages for Linux SQLSRV and PDO_SQLSRV drivers (4.0.5) are available. You can also find pre-compiled binaries (4.0.5) with PHP 7.0.11 for Ubuntu 15.04, Ubuntu 16.04, and RedHat 7.2 here.
This release also includes the following fixes:
- Fixed segmentation fault when calling PDOStatement::getColumnMeta on RedHat 7.2.
- Fixed segmentation fault when fetch mode is set to ATTR_EMULATE_PREPARES on RedHat 7.2.
- Fixed issue #139 : sqlsrv_fetch_object calls custom class constructor in static context and outputs an error.
Thanks,
SQL Server Engineering Team
4.1.2 - Windows - Preview
Thanks to the community’s input, this release expands drivers functionalities. Updated Windows drivers include some bug fixes:
-
Fixed issue #119 (modifying class name in sqlsrv_fetch_object).
-
Added following integer SQL Types constants for cases which function-like SQL types constants cannot be used e.g. type comparison:
SQLSRV constant Typical SQL Server data type SQL type identifier SQLSRV_SQLTYPE_DECIMAL decimal SQL_DECIMAL SQLSRV_SQLTYPE_NUMERIC numeric SQL_NUMERIC SQLSRV_SQLTYPE_CHAR char SQL_CHAR SQLSRV_SQLTYPE_NCHAR nchar SQL_WCHAR SQLSRV_SQLTYPE_VARCHAR varchar SQL_VARCHAR SQLSRV_SQLTYPE_NVARCHAR nvarchar SQL_WVARCHAR SQLSRV_SQLTYPE_BINARY binary SQL_BINARY SQLSRV_SQLTYPE_VARBINARY varbinary SQL_VARBINARY Note: These constants should be used in type comparison operations (refer to issue #87 and #99 ), and don't replace the function like constants with the similar syntax, for binding parameters you should use the function-like constants, otherwise you'll get an error.
Thanks,
SQL Server Engineering Team
4.0.4 - Linux - Preview
Thanks to the community’s input, this release expands drivers functionalities. Updated Linux drivers (4.0.4) compiled with PHP 7.0.10 are available for Ubuntu 15.04, Ubuntu 16.04, and RedHat 7.2. This release includes the following fixes:
-
Fixed undefined symbols at SQL* error when loading the drivers.
-
Fixed undefined symbol issues at LocalAlloc and LocalFree on RedHat7.2.
-
Fixed issue #144 (floating point exception).
-
Fixed issue #119 (modifying class name in sqlsrv_fetch_object).
-
Added support for EMULATE_PREPARE feature.
-
Added following integer SQL Types constants for cases which function-like SQL types constants cannot be used e.g. type comparison:
SQLSRV constant Typical SQL Server data type SQL type identifier SQLSRV_SQLTYPE_DECIMAL decimal SQL_DECIMAL SQLSRV_SQLTYPE_NUMERIC numeric SQL_NUMERIC SQLSRV_SQLTYPE_CHAR char SQL_CHAR SQLSRV_SQLTYPE_NCHAR nchar SQL_WCHAR SQLSRV_SQLTYPE_VARCHAR varchar SQL_VARCHAR SQLSRV_SQLTYPE_NVARCHAR nvarchar SQL_WVARCHAR SQLSRV_SQLTYPE_BINARY binary SQL_BINARY SQLSRV_SQLTYPE_VARBINARY varbinary SQL_VARBINARY Note: These constants should be used in type comparison operations (refer to issue #87 and #99 ), and don't replace the function like constants with similar syntax. For binding parameters you should use the function-like constants, otherwise you'll get an error.
Thanks,
SQL Server Engineering Team
4.1.1 - Windows
Thanks to the community’s input, this release expands drivers functionalities. Updated Windows drivers built and compiled with PHP 7.0.9 are available and include some bug fixes:
- Fixed issue with storing integers in varchar field.
- Fixed issue with invalid connection handler if one connection fails.
- Fixed crash when emulate prepare is on.
Thanks,
SQL Server Engineering Team
4.0.3 - Linux
Hi all, we are delighted to share the Preview (4.0.3) of the SQLSRV and PDO_SQLSRV driver (64bit and 32bit) for Linux. Updated Linux drivers are available for Ubuntu 15.04, Ubuntu 16.04, and RedHat 7.2. This update provides the following improvements and bug fixes:
-
Fixed data corruption in binding integer parameters.
-
Fixed invalid sql_display_size error.
-
Fixed issue with invalid statement options.
-
Fixed binding bit parameters.
The source code of the drivers has also been made available. You can build from source using the tutorial here.
Thanks,
SQL Server Engineering Team
4.1.0 - Windows
Thanks to the community’s input, this release expands drivers functionalities and also includes some bug fixes:
- SQLSRV_ATTR_FETCHES_NUMERIC_TYPE connection attribute flag is added to PDO_SQLSRV driver to handle numeric fetches from columns with numeric Sql types (only bit, integer, smallint, tinyint, float and real). This flag can be turned on by setting its value in PDO::setAttribute to true, For example,
$conn->setAttribute(PDO::SQLSRV_ATTR_FETCHES_NUMERIC_TYPE,true);
If SQLSRV_ATTR_FETCHES_NUMERIC_TYPE is set to true the results from an integer column will be represented as an int, likewise, Sql types float and real will be represented as float.
Note for exceptions:- When connection option flag ATTR_STRINGIFY_FETCHES is on, even when SQLSRV_ATTR_FETCHES_NUMERIC_TYPE is on, the return value will still be string.
- When the returned PDO type in bind column is PDO_PARAM_INT, the return value from a integer column will be int even if SQLSRV_ATTR_FETCHES_NUMERIC_TYPE is off.
- Fixed float truncation when using buffered query.
- Fixed handling of Unicode strings and binary when emulate prepare is on in PDOStatement::bindParam. To bind a unicode string, PDO::SQLSRV_ENCODING_UTF8 should be set using $driverOption, and to bind a string to column of Sql type binary, PDO::SQLSRV_ENCODING_BINARY should be set.
- Fixed string truncation in bind output parameters when the size is not set and the length of initialized variable is less than the output.
- Fixed bind string parameters as bidirectional parameters (PDO::PARAM_INPUT_OUTPUT) in PDO_SQLSRV driver. Note for output or bidirectional parameters, PDOStatement::closeCursor should be called to get the output value.
Thanks,
SQL Server Engineering Team
4.0.2 - Linux
Hi all, we are delighted to share the Preview (4.0.2) of the SQLSRV and PDO_SQLSRV driver (64bit and 32bit) for Linux. Updated Linux drivers are available for Ubuntu 15.04, Ubuntu 16.04, and RedHat 7.2. This update provides the following improvements and bug fixes:
- The PDO_SQLSRV driver no longer requires PDO to be built as a shared extension.
- Fixed an issue with format specifiers in error messages.
- Fixed a segmentation fault when using buffered cursors.
- Fixed an issue whereby calling sqlsrv_rows_affected on an empty result set would return a null result instead of 0.
- Fixed an issue with error messages when there is an error in sizes in SQLSRV_SQLTYPE_*.
v4.0.1 - Linux
This release is an early preview of the Microsoft Drivers for PHP for SQL Server on Linux - RedHat/CentOS and Ubuntu. This release includes the sqlsrv and pdo_sqlsrv drivers for Ubuntu and sqlsrv driver for RedHat/CentOS. The Linux drivers only support PHP 7.
Check out the detailed release notes HERE
To get started check out the instructions HERE. Should you have questions feel free to email me at [email protected] or open a GitHub issue.
Going forward we will be improving the installation experience and fix several of the limitations listed HERE
Thanks,
SQL Server Engineering Team
Production Ready Release for PHP Drivers 4.0 for SQL Server
Hi all, we are delighted to share the RTW bits of the SQLSRV and PDO_SQLSRV driver (64bit and 32bit) with PHP7 support
The quality of SQLSRV and PDO_SQLSRV is improved and includes some memory leak fixes:
- Fixed a heap corruption when binding parameters in a prepare statement with error
- Fixed leaks in SQLSRV streams and output parameters handling
- Fixed leaks in SQLSRV fetch object
- Fixed leaks in SQLSRV binding object parameters
- Fixed leaks in SQLSRV buffered result set
- Fixed leaks in SQLSRV getting datetime and stream fields
- Fixed leaks in PDO_SQLSRV field cache
- Fixed leaks in PDO_SQLSRV construct when connecting with error
- Fixed leaks in PDO_SQLSRV exception handling
We will continue to make bug fixes and adding new features based on your feedback on GitHub.
Thanks,
SQL Server Engineering Team