Tag - mssql - liczba wpisów 1

PHP - Connect to MSSQL database Kategoria: PHP | Tagi: codeigniter, mssql, php | Autor: Bartłomiej Gałęzia

add-apt-repository ppa:ondrej/php -y
apt-get update
apt-get install aptitude vim mc nmap curl apache2 php php-dev php-xml php-pear
apt-get install unixodbc-dev

sudo pecl install sqlsrv
sudo pecl install pdo_sqlsrv

printf "; priority=20\nextension=sqlsrv.so\n" > /etc/php/8.1/mods-available/sqlsrv.ini
printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/8.1/mods-available/pdo_sqlsrv.ini

phpenmod -v 8.1 sqlsrv pdo_sqlsrv

curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list

sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools18
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc
source ~/.bashrc
sudo apt-get install -y unixodbc-dev

service apache2 restart



https://forum.codeigniter.com/thread-69740-post-350441.html

https://learn.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-ver16#installing-the-drivers-on-ubuntu-1604-for-php-70

https://learn.microsoft.com/en-us/sql/connect/php/system-requirements-for-the-php-sql-driver?redirectedfrom=MSDN&view=sql-server-ver16

https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16

Wyszukaj

Zapisz się do newsletera