1

Hi I am new with Ubuntu and have some problem with PHP. 1. I already install phpmyadmin and PHP 7.0 and it work well and have 1 application running on it. 2. I have a new project that need to connect to MSSQL with another server but PHP 7.0 not support MSSQL PHP library so i need to install another package to make this project work. 3. After i research i found:

Linux - PHP 7.0 and MSSQL (Microsoft SQL)

so I try to install like this

3.1) sudo su 3.2) curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 3.3) curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list 3.4) exit 3.5) sudo apt-get update 3.6) sudo ACCEPT_EULA=Y apt-get install -y msodbcsql mssql-tools unixodbc-dev 3.7) sudo pecl install sqlsrv 3.8) sudo pecl install pdo_sqlsrv 3.9) echo "extension=sqlsrv" >> php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||" 3.10) echo "extension=pdo_sqlsrv" >> php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"

But after i try to do 3.7) i got ERROR "phpize not found" so i search and found that need to run "apt-get install php-dev" before it(after issue this command i found that that install PHP7.1 for me) when it finish install i try to do 3.7) again this time have this warning "Invalid augment supplied for foreach() in Command.php on line 249:XML Extension not found" so i search and need to run "apt-get install php-pear", "apt-get install pkg-config", install libbson-1.0, "apt-get install php-xml php7.0-xml" and that make me can finish install 3.1 - 3.10

now I have 2 PHP 2 version 7.0 and 7.1 with 2 extension folder 20151012 and 20160303 with PHP 7.0 can work on MYSQL and PHP 7.1 can work on MSSQL and can swith apache to make it work by command "a2enmod php7.0" or "a2enmod php7.1"

I need to make my server can work by PHP only version with MYSQL and MSSQL but i not sure how to do and what direction i need to go PHP 7.0 or 7.1

Please help to gibe me the direction that easiest for me.

Thank

Baza
  • 11
  • 2

0 Answers0