diff --git a/README.md b/README.md index 75b2a438..4cbec747 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ You must first be able to build PHP 7 without including these extensions. For h 5. To install the resulting build, run `nmake install` or just copy php_sqlsrv.dll and/or php_pdo_sqlsrv.dll to your PHP extension directory. -This software has been compiled and tested under PHP 7.0.8 using the Visual C++ 2015 compiler. +This software has been compiled and tested under PHP 7.0.20 and 7.1.6 using the Visual C++ 2015 compiler. ## Install (Windows) @@ -80,7 +80,7 @@ This software has been compiled and tested under PHP 7.0.8 using the Visual C++ 3. Restart the Web server. ## Install (UNIX) -The following instructions assume a clean environment and show how to install PHP 7.x, Microsoft ODBC driver, apache, and Microsoft PHP drivers on Ubuntu 15, 16, RedHat 7 and Mac OS X. To see how to get PHP SQLSRV drivers running on Debian, please visit [Wiki](https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways). Note that Debian is not officially supported and this instruction hasn't been tested in our test lab. +The following instructions assume a clean environment and show how to install PHP 7.x, Microsoft ODBC driver, apache, and Microsoft PHP drivers on Ubuntu 15, 16, RedHat 7 and Mac OS X. To see how to get PHP SQLSRV drivers running on Debian, please visit [Wiki](https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways). Note, however, that Debian is not officially supported and these instructions have not been tested in our test lab. ### Step 1: Install PHP7+ @@ -209,13 +209,18 @@ The following instructions assume a clean environment and show how to install PH brew install mssql-tools brew install autoconf -*Note: You need to make sure you install PHP 7+ before you proceed to step 3. The Microsoft PHP Drivers for SQL Server will only work for PHP 7+. +*Note: Be sure to install PHP 7+ before proceeding to step 3. The Microsoft PHP Drivers for SQL Server will only work for PHP 7+. ### Step 3: Install the Microsoft PHP Drivers for SQL Server -*Note: The first step is not required in Mac OS X. PECL installs the stable version when version is not specified. You may run `sudo pecl search sqlsrv` to search for the latest releases and `sudo pecl install sqlsrv-[version]` to install a specific version. Drivers are Mac-compatible starting from `4.1.7preview` release. +*Note: You can run `sudo pecl search sqlsrv` to search for the latest releases and `sudo pecl install sqlsrv-[version]` to install a specific version. PECL installs the stable version when version is not specified. Drivers are Mac-compatible starting from `4.1.7preview` release. + +On Ubuntu systems only, run: sudo pear config-set php_ini `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` system + +On all systems, run: + sudo pecl install sqlsrv sudo pecl install pdo_sqlsrv @@ -236,7 +241,10 @@ The following instructions assume a clean environment and show how to install PH **RedHat** - sudo yum install httpd + sudo su + yum install httpd + echo "extension=sqlsrv.so" > /etc/php.d/sqlsrv.ini + echo "extension=pdo_sqlsrv.so" > /etc/php.d/pdo_sqlsrv.ini **Mac OS X** @@ -257,7 +265,10 @@ The following instructions assume a clean environment and show how to install PH **RedHat** - sudo yum install httpd + sudo su + yum install httpd + echo "extension=sqlsrv.so" > /etc/php.d/sqlsrv.ini + echo "extension=pdo_sqlsrv.so" > /etc/php.d/pdo_sqlsrv.ini **Mac OS X** @@ -278,10 +289,10 @@ The following instructions assume a clean environment and show how to install PH sudo apachectl restart -*Note to RedHat users: SELinux is installed by default and runs in Enforcing mode. To allow Apache to connect to database through SELinux, do this `sudo setsebool -P httpd_can_network_connect_db 1` +*Note to RedHat users: SELinux is installed by default and runs in Enforcing mode. To allow Apache to connect to database through SELinux, run `sudo setsebool -P httpd_can_network_connect_db 1` ### Step 6: Create your sample app -Navigate to `/var/www/html` (`/usr/local/var/www/htdocs` on Mac) and create a new file called testsql.php. Copy and paste the following code in tetsql.php and change the servername, username, password and databasename. +Navigate to `/var/www/html` (`/usr/local/var/www/htdocs` on Mac) and create a new file called testsql.php. Copy and paste the following code into tetsql.php and change the servername, username, password and databasename.