Update Ubuntu 16 Apache Configuration (#342)

* Order change

Changing order of steps, to install the drivers before installing apache

* Apache php.ini for ubuntu 16

On Ubuntu 16, drivers should be added to apache php.ini file too
This commit is contained in:
ulvii 2017-03-27 14:02:36 -07:00 committed by GitHub
parent bd8d1e1bf4
commit 6bd361c1ef

View file

@ -215,7 +215,16 @@ Following instructions shows how to install PHP 7.x, Microsoft ODBC driver, apac
*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+.
### Step 3: Install Apache
### Step 3: Install the Microsoft PHP Drivers for SQL Server
sudo pear config-set php_ini `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` system
sudo pecl install sqlsrv
sudo pecl install pdo_sqlsrv
*Note: it installs the stable version, for specific version you should set the version. For example, do `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.
### Step 4: Install and Configure Apache
#### PHP 7.0
@ -223,6 +232,8 @@ Following instructions shows how to install PHP 7.x, Microsoft ODBC driver, apac
sudo apt-get install libapache2-mod-php7.0
sudo apt-get install apache2
echo "extension=sqlsrv.so" >> /etc/php/7.0/apache2/php.ini
echo "extension=pdo_sqlsrv.so" >> /etc/php/7.0/apache2/php.ini
**RedHat**
@ -238,6 +249,8 @@ Following instructions shows how to install PHP 7.x, Microsoft ODBC driver, apac
sudo apt-get install libapache2-mod-php7.1
sudo apt-get install apache2
echo "extension=sqlsrv.so" >> /etc/php/7.1/apache2/php.ini
echo "extension=pdo_sqlsrv.so" >> /etc/php/7.1/apache2/php.ini
**RedHat**
@ -247,15 +260,6 @@ Following instructions shows how to install PHP 7.x, Microsoft ODBC driver, apac
(echo "<FilesMatch .php$>"; echo "SetHandler application/x-httpd-php"; echo "</FilesMatch>";) >> /usr/local/etc/apache2/2.4/httpd.conf
### Step 4: Install the Microsoft PHP Drivers for SQL Server
sudo pear config-set php_ini `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` system
sudo pecl install sqlsrv
sudo pecl install pdo_sqlsrv
*Note: it installs the stable version, for specific version you should set the version. For example, do `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. .
### Step 5: Restart Apache to load the new php.ini file