pecl install
. You may need to run pecl channel-update pecl.php.net
first. Note that some supported Linux distros default to PHP 7.1 or earlier, which is not supported for the latest version of the PHP drivers for SQL Server -- please see the notes at the beginning of each section to install PHP 7.2 or 7.3 instead.phpenmod sqlsrv pdo_sqlsrv
.phpenmod sqlsrv pdo_sqlsrv
.sqlsrv.ini
and pdo_sqlsrv.ini
are located in /etc/php/7.4/fpm/conf.d/
:/etc/nginx/sites-available/default
file. Add index.php
to the list below the section that says # Add index.php to the list if you are using PHP
:# pass PHP scripts to FastCGI server
as follows:/usr/sbin
to your $PATH
, as the locale-gen
executable is located there.phpenmod sqlsrv pdo_sqlsrv
. As with locale-gen
, phpenmod
is located in /usr/sbin
so you may need to add this directory to your $PATH
.<SuseVersion>
with your version of Suse - if you are using Suse Enterprise Linux 15, it will be SLE_15 or SLE_15_SP1. For Suse 12, use SLE_12_SP4 (or above if applicable). Not all versions of PHP are available for all versions of Suse Linux - please refer to http://download.opensuse.org/repositories/devel:/languages:/php
to see which versions of Suse have the default version PHP available, or to http://download.opensuse.org/repositories/devel:/languages:/php:/
to see which other versions of PHP are available for which versions of Suse.https://download.opensuse.org/repositories/devel:/languages:/php:/php72/<SuseVersion>/devel:languages:php:php72.repo
.To install PHP 7.3, replace the repository URL below with the following URL:https://download.opensuse.org/repositories/devel:/languages:/php:/php73/<SuseVersion>/devel:languages:php:php73.repo
.Connection to 'pecl.php.net:443' failed: Unable to find the socket transport 'ssl'
, edit the pecl script at /usr/bin/pecl and remove the -n
switch in the last line. This switch prevents PECL from loading ini files when PHP is called, which prevents the OpenSSL extension from loading.edge/community
repository. Please check Enable Community Repository on their WIKI page. Add the following line to /etc/apt/repositories
, replacing <mirror>
with the URL of an Alpine repository mirror: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:httpd.conf
, for your Apache installation, runhttpd.conf
. Be sure to substitute the path returned by the preceding command in place of /usr/local/etc/httpd/httpd.conf
:/var/www/html/
on Ubuntu, Debian, and Redhat, /srv/www/htdocs
on SUSE, /var/www/localhost/htdocs
on Alpine, or /usr/local/var/www
on macOS. Copy the following script to it, replacing the server, database, username, and password as appropriate.