Skip to content

Commit 8f9ecde

Browse files
authored
Merge pull request #787 from Microsoft/dev
Dev
2 parents 21ccade + 4509756 commit 8f9ecde

File tree

61 files changed

+4113
-1359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+4113
-1359
lines changed

CHANGELOG.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,41 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55

6-
## Windows/Linux/macOS 5.2.0 - 2017-02-14
6+
## 5.2.1-preview - 2018-06-01
7+
Updated PECL release packages. Here is the list of updates:
8+
9+
### Added
10+
- Added support for Azure Key Vault for Always Encrypted for basic CRUD functionalities such that Always Encrypted feature is also available to Linux or macOS users
11+
- Added support for macOS High Sierra (requires [MS ODBC Driver 17+](https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017))
12+
13+
### Fixed
14+
- Issue [#577](https://github.com/Microsoft/msphpsql/issues/577) - Idle Connection Resiliency doesn't work with Column Encryption enabled connection
15+
- Issue [#678](https://github.com/Microsoft/msphpsql/issues/678) - Idle Connection Resiliency doesn't work with Connection Pooling bug
16+
- Issue [#699](https://github.com/Microsoft/msphpsql/issues/699) - Binding output parameter failed when the query in the stored procedure returned no data. The test case has been added to the test lab.
17+
- Issue [#705](https://github.com/Microsoft/msphpsql/issues/705) - AE - Retrieving a negative decimal value (edge case) as output parameter causes truncation
18+
- Issue [#706](https://github.com/Microsoft/msphpsql/issues/706) - AE - Cannot insert double with precision and scale (38, 38)
19+
- Issue [#707](https://github.com/Microsoft/msphpsql/issues/707) - AE - Fetching decimals / numerics as output parameters bound to PDO::PARAM_BOOL or PDO::PARAM_INT returns floats, not integers
20+
- Issue [#735](https://github.com/Microsoft/msphpsql/issues/735) - Extended the buffer size for PDO lastInsertId such that data types other than integers can be supported
21+
- Pull Request [#759](https://github.com/Microsoft/msphpsql/pull/759) - Removed the limitation of binding a binary as inout param as PDO::PARAM_STR with SQLSRV_ENCODING_BINARY
22+
- Pull Request [#775](https://github.com/Microsoft/msphpsql/pull/775) - Fixed the problem for output params with SQL types specified as SQLSRV_SQLTYPE_DECIMAL or SQLSRV_SQLTYPE_NUMERIC
23+
24+
### Limitations
25+
- No support for inout / output params when using sql_variant type
26+
- In Linux and macOS, setlocale() only takes effect if it is invoked before the first connection. Attempting to set the locale after connection will not work
27+
- Always Encrypted feature, which requires [MS ODBC Driver 17+](https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017)
28+
- only Windows Certificate Store and Azure Key Vault are supported
29+
- Issue [#716](https://github.com/Microsoft/msphpsql/issues/716) - With Always Encrypted feature enabled, Named Parameters in Sub Queries are not supported
30+
- [Always Encrypted limitations](https://docs.microsoft.com/en-us/sql/connect/php/using-always-encrypted-php-drivers?view=sql-server-2017#limitations-of-the-php-drivers-when-using-always-encrypted)
31+
32+
### Known Issues
33+
- Connection pooling on Linux or macOS not recommended with [unixODBC](http://www.unixodbc.org/) < 2.3.6
34+
- When pooling is enabled in Linux or macOS
35+
- unixODBC <= 2.3.4 (Linux and macOS) might not return proper diagnostics information, such as error messages, warnings and informative messages
36+
- due to this unixODBC bug, fetch large data (such as xml, binary) as streams as a workaround. See the examples [here](https://github.com/Microsoft/msphpsql/wiki/Features#pooling)
37+
- With ColumnEncryption enabled, calling stored procedures with XML parameters does not work (Issue [#674](https://github.com/Microsoft/msphpsql/issues/674))
38+
39+
40+
## Windows/Linux/macOS 5.2.0 - 2018-03-23
741
Updated PECL release packages. Here is the list of updates:
842

943
### Added

Dockerfile-msphpsql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && ACCEPT_EULA=Y apt
4545
ENV PATH="/opt/mssql-tools/bin:${PATH}"
4646

4747
#install coveralls
48-
RUN pip install --upgrade pip && pip install cpp-coveralls
48+
RUN python -m pip install --upgrade pip && pip install cpp-coveralls
4949

5050
#Either Install git / download zip (One can see other strategies : https://ryanfb.github.io/etc/2015/07/29/git_strategies_for_docker.html )
5151
#One option is to get source from zip file of repository.

Linux-mac-install.md

Lines changed: 45 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ These instruction install PHP 7.2 by default -- see the notes at the beginning o
99
- [Installing the drivers on Red Hat 7](#installing-the-drivers-on-red-hat-7)
1010
- [Installing the drivers on Debian 8 and 9](#installing-the-drivers-on-debian-8-and-9)
1111
- [Installing the drivers on Suse 12](#installing-the-drivers-on-suse-12)
12-
- [Installing the drivers on macOS El Capitan and Sierra](#installing-the-drivers-on-macos-el-capitan-and-sierra)
12+
- [Installing the drivers on macOS El Capitan, Sierra and High Sierra](#installing-the-drivers-on-macos-el-capitan-sierra-and-high-sierra)
1313

1414
## Installing the drivers on Ubuntu 16.04 and 17.10
1515

16-
> [!NOTE]
17-
> To install PHP 7.0 or 7.1, replace 7.2 with 7.0 or 7.1 in the following commands.
16+
> [!NOTE]
17+
> To install PHP 7.0 or 7.1, replace 7.2 with 7.0 or 7.1 in the following commands.
1818
1919
### Step 1. Install PHP
2020
```
@@ -28,12 +28,12 @@ Install the ODBC driver for Ubuntu by following the instructions on the [Linux a
2828

2929
### Step 3. Install the PHP drivers for Microsoft SQL Server
3030
```
31+
sudo pecl install sqlsrv
32+
sudo pecl install pdo_sqlsrv
3133
sudo su
3234
echo extension=pdo_sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/30-pdo_sqlsrv.ini
3335
echo extension=sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20-sqlsrv.ini
3436
exit
35-
sudo pecl install sqlsrv
36-
sudo pecl install pdo_sqlsrv
3737
```
3838
### Step 4. Install Apache and configure driver loading
3939
```
@@ -42,8 +42,8 @@ apt-get install libapache2-mod-php7.2 apache2
4242
a2dismod mpm_event
4343
a2enmod mpm_prefork
4444
a2enmod php7.2
45-
echo "extension=sqlsrv.so" >> /etc/php/7.2/apache2/php.ini
46-
echo "extension=pdo_sqlsrv.so" >> /etc/php/7.2/apache2/php.ini
45+
echo "extension=pdo_sqlsrv.so" >> /etc/php/7.2/apache2/conf.d/30-pdo_sqlsrv.ini
46+
echo "extension=sqlsrv.so" >> /etc/php/7.2/apache2/conf.d/20-sqlsrv.ini
4747
```
4848
### Step 5. Restart Apache and test the sample script
4949
```
@@ -53,8 +53,8 @@ To test your installation, see [Testing your installation](#testing-your-install
5353

5454
## Installing the drivers on Red Hat 7
5555

56-
> [!NOTE]
57-
> To install PHP 7.0 or 7.1, replace remi-php72 with remi-php70 or remi-php71 respectively in the following commands.
56+
> [!NOTE]
57+
> To install PHP 7.0 or 7.1, replace remi-php72 with remi-php70 or remi-php71 respectively in the following commands.
5858
5959
### Step 1. Install PHP
6060

@@ -79,12 +79,12 @@ scl enable devtoolset-7 bash
7979
```
8080
### Step 3. Install the PHP drivers for Microsoft SQL Server
8181
```
82+
sudo pecl install sqlsrv
83+
sudo pecl install pdo_sqlsrv
8284
sudo su
8385
echo extension=pdo_sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/30-pdo_sqlsrv.ini
8486
echo extension=sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20-sqlsrv.ini
8587
exit
86-
sudo pecl install sqlsrv
87-
sudo pecl install pdo_sqlsrv
8888
```
8989
An issue in PECL may prevent correct installation of the latest version of the drivers even if you have upgraded GCC. To install, download the packages and compile manually:
9090
```
@@ -116,8 +116,8 @@ To test your installation, see [Testing your installation](#testing-your-install
116116

117117
## Installing the drivers on Debian 8 and 9
118118

119-
> [!NOTE]
120-
> To install PHP 7.0 or 7.1, replace 7.2 in the following commands with 7.0 or 7.1.
119+
> [!NOTE]
120+
> To install PHP 7.0 or 7.1, replace 7.2 in the following commands with 7.0 or 7.1.
121121
122122
### Step 1. Install PHP
123123
```
@@ -126,7 +126,7 @@ apt-get install curl apt-transport-https
126126
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
127127
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
128128
apt-get update
129-
apt-get install y php7.2 php7.2-dev php7.2-xml
129+
apt-get install -y php7.2 php7.2-dev php7.2-xml
130130
```
131131
### Step 2. Install prerequisites
132132
Install the ODBC driver for Debian by following the instructions on the [Linux and macOS installation page](https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server).
@@ -140,12 +140,12 @@ locale-gen
140140

141141
### Step 3. Install the PHP drivers for Microsoft SQL Server
142142
```
143+
sudo pecl install sqlsrv
144+
sudo pecl install pdo_sqlsrv
143145
sudo su
144146
echo extension=pdo_sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/30-pdo_sqlsrv.ini
145147
echo extension=sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20-sqlsrv.ini
146148
exit
147-
sudo pecl install sqlsrv
148-
sudo pecl install pdo_sqlsrv
149149
```
150150
### Step 4. Install Apache and configure driver loading
151151
```
@@ -154,8 +154,8 @@ apt-get install libapache2-mod-php7.2 apache2
154154
a2dismod mpm_event
155155
a2enmod mpm_prefork
156156
a2enmod php7.2
157-
echo "extension=sqlsrv.so" >> /etc/php/7.2/apache2/php.ini
158-
echo "extension=pdo_sqlsrv.so" >> /etc/php/7.2/apache2/php.ini
157+
echo "extension=pdo_sqlsrv.so" >> /etc/php/7.2/apache2/conf.d/30-pdo_sqlsrv.ini
158+
echo "extension=sqlsrv.so" >> /etc/php/7.2/apache2/conf.d/20-sqlsrv.ini
159159
```
160160
### Step 5. Restart Apache and test the sample script
161161
```
@@ -165,10 +165,10 @@ To test your installation, see [Testing your installation](#testing-your-install
165165

166166
## Installing the drivers on Suse 12
167167

168-
> [!NOTE]
169-
> To install PHP 7.0, skip the command below adding the repository - 7.0 is the default PHP on suse 12.
170-
> To install PHP 7.1, replace the repository URL below with the following URL:
171-
`http://download.opensuse.org/repositories/devel:/languages:/php:/php71/SLE_12/devel:languages:php:php71.repo`
168+
> [!NOTE]
169+
> To install PHP 7.0, skip the command below adding the repository - 7.0 is the default PHP on suse 12.
170+
> To install PHP 7.1, replace the repository URL below with the following URL:
171+
`http://download.opensuse.org/repositories/devel:/languages:/php:/php71/SLE_12/devel:languages:php:php71.repo`
172172

173173
### Step 1. Install PHP
174174
```
@@ -182,12 +182,12 @@ Install the ODBC driver for Suse 12 by following the instructions on the [Linux
182182

183183
### Step 3. Install the PHP drivers for Microsoft SQL Server
184184
```
185+
sudo pecl install sqlsrv
186+
sudo pecl install pdo_sqlsrv
185187
sudo su
186188
echo extension=pdo_sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/pdo_sqlsrv.ini
187189
echo extension=sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/sqlsrv.ini
188190
exit
189-
sudo pecl install sqlsrv
190-
sudo pecl install pdo_sqlsrv
191191
```
192192
### Step 4. Install Apache and configure driver loading
193193
```
@@ -203,28 +203,30 @@ sudo systemctl restart apache2
203203
```
204204
To test your installation, see [Testing your installation](#testing-your-installation) at the end of this document.
205205

206-
## Installing the drivers on macOS El Capitan and Sierra
206+
## Installing the drivers on macOS El Capitan, Sierra and High Sierra
207207

208208
If you do not already have it, install brew as follows:
209209
```
210210
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
211211
```
212212

213-
> [!NOTE]
214-
> To install PHP 7.0 or 7.1, replace php72 with php70 or php71 respectively in the following commands.
213+
> [!NOTE]
214+
> To install PHP 7.0 or 7.1, replace [email protected] with [email protected] or [email protected] respectively in the following commands.
215215
216216
### Step 1. Install PHP
217217

218218
```
219219
brew tap
220-
brew tap homebrew/dupes
221-
brew tap homebrew/versions
222-
brew tap homebrew/homebrew-php
223-
brew install php72 --with-pear --with-httpd24 --with-cgi
224-
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile
225-
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
226-
source ~/.bash_profile
220+
brew tap homebrew/core
221+
brew install [email protected]
222+
```
223+
224+
PHP should now be in your path -- run `php -v` to verify that you are running the correct version of PHP. If PHP is not in your path or it is not the correct version, run the following:
225+
227226
```
227+
brew link --force --overwrite [email protected]
228+
```
229+
228230
### Step 2. Install prerequisites
229231
Install the ODBC driver for macOS by following the instructions on the [Linux and macOS installation page](https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server).
230232

@@ -235,13 +237,20 @@ brew install autoconf automake libtool
235237

236238
### Step 3. Install the PHP drivers for Microsoft SQL Server
237239
```
238-
chmod -R ug+w /usr/local/opt/php72/lib/php
239-
pear config-set php_ini /usr/local/etc/php/7.2/php.ini system
240240
sudo pecl install sqlsrv
241241
sudo pecl install pdo_sqlsrv
242242
```
243243
### Step 4. Install Apache and configure driver loading
244244
```
245+
brew install apache2
246+
```
247+
To find the Apache configuration file for your Apache installation, run
248+
```
249+
apachectl -V | grep SERVER_CONFIG_FILE
250+
```
251+
and substitute the path for `httpd.conf` in the following commands:
252+
```
253+
echo "LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so" >> /usr/local/etc/httpd/httpd.conf
245254
(echo "<FilesMatch .php$>"; echo "SetHandler application/x-httpd-php"; echo "</FilesMatch>";) >> /usr/local/etc/httpd/httpd.conf
246255
```
247256
### Step 5. Restart Apache and test the sample script

0 commit comments

Comments
 (0)