---
title: "View source for Upgrading To Php 8 1 - DreamFactory Wiki"
source: "https://wiki.dreamfactory.com/index.php?action=edit&title=Upgrading_To_Php_8_1"
canonical_url: "https://wiki.dreamfactory.com/index.php?action=edit&title=Upgrading_To_Php_8_1"
converted_at: "2026-04-30T12:37:19.648Z"
format: "markdown"
converted_by: "html-to-md-ai"
---
[]()
	
	
	
	# View source for Upgrading To Php 8 1

	
		
		← [Upgrading To Php 8 1](/Upgrading_To_Php_8_1)
		
		
		
		[Jump to navigation](#mw-head)
		[Jump to search](#searchInput)
		You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: [Users](/index.php?title=DreamFactory_Wiki:Users&action=edit&redlink=1).

---

You can view and copy the source of this page.

&lt;span id="upgrading-to-php-8.1">&lt;/span>
= Upgrading to PHP 8.1 =

Estimated Upgrade Time: 1.5 Hours
DreamFactory is committed to making the shift from PHP 7.2 to PHP 8.1 as simple as possible. Some services have undergone significant changes as a result of third-party API providers. We have compiled a list of all services that have experienced noticeable changes, which you can find below. While it's not necessary to update all of these services, if you are using any of them, we recommend that you review the relevant section to expedite the development of your dream API.

This article assumes that you are not using our automatic installers. However, if you have a different operating system or prefer not to handle the installation process manually, you can refer to the relevant guide [[Getting_Started/Installing_Dreamfactory|here]]. Note that these steps are intended for those using the [https://wiki.ubuntu.com/Releases ''Supported Ubuntu Release''].
&lt;span id="switch-to-php-8.1">&lt;/span>
== Switch to PHP 8.1 ==

This section demonstrates how to migrate from PHP 7.4 to PHP 8.1 on Ubuntu 20.04.

# Add PPA:

&lt;syntaxhighlight lang="bash">sudo add-apt-repository ppa:ondrej/php -y&lt;/syntaxhighlight>
&lt;ol start="2" style="list-style-type: decimal;">
&lt;li>Install PHP 8.1 and the required dependencies:&lt;/li>&lt;/ol>

&lt;syntaxhighlight lang="bash">sudo apt-get install -y php8.1-common \
php8.1-xml \
php8.1-cli \
php8.1-fpm \
php8.1-curl \
php8.1-mysqlnd \
php8.1-sqlite \
php8.1-soap \
php8.1-mbstring \
php8.1-zip \
php8.1-bcmath \
php8.1-dev \
php8.1-ldap \
php8.1-pgsql \
php8.1-interbase \
php8.1-gd \
php8.1-sybase&lt;/syntaxhighlight>
&lt;ol start="3" style="list-style-type: decimal;">
&lt;li>After successful installation, manually switch to PHP 8.1:&lt;/li>&lt;/ol>

&lt;syntaxhighlight lang="bash">sudo update-alternatives --set php /usr/bin/php8.1 \
sudo update-alternatives --set phar /usr/bin/phar8.1 \
sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.1 \&lt;/syntaxhighlight>
&lt;ol start="4" style="list-style-type: decimal;">
&lt;li>Select the version of PHP you need by using:&lt;/li>&lt;/ol>

&lt;syntaxhighlight lang="bash">sudo update-alternatives --config php&lt;/syntaxhighlight>
If you would like to know how to install the dependencies for the DreamFactory packages that you are interested in, you can refer to the table of contents below for guidance.

Command &lt;code>pecl install&lt;/code> may fail with a message like:

&lt;code>pecl/sqlsrv is already installed and is the same as the released version 5.10.1 install failed&lt;/code>

In this case use force install: &lt;code>pecl install -f &amp;lt;extension_name&amp;gt;&lt;/code>
&lt;span id="configure-nginx">&lt;/span>
=== Configure NGINX ===

If you are using FastCGI Process Manager (FPM) with NGINX or Apache, you must update your DreamFactory installation's host configuration. To update the configuration for NGINX, modify the version of PHP specified in the Nginx server configuration file, which is located at &lt;code>/etc/nginx/sites-available/default&lt;/code>.

&lt;syntaxhighlight lang="diff">-fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
+fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;&lt;/syntaxhighlight>
Now you can update your DreamFactory instance to the latest version.

# Use the &lt;code>git pull&lt;/code> command from the DreamFactory root directory.
# Next, run the &lt;code>composer install&lt;/code> command.
# To complete the process, restart &lt;code>fpm&lt;/code> and &lt;code>nginx&lt;/code>:

&lt;syntaxhighlight lang="bash">sudo service php8.1-fpm restart &amp;&amp; service nginx restart&lt;/syntaxhighlight>
&lt;span id="table-of-contents">&lt;/span>
== Table of contents ==

&lt;span id="free-plan">&lt;/span>
==== Free Plan ====

* [[#cassandra|Cassandra]]
* [[#couchbase|Couchbase]]
* [[#email|Email]]
* [[#firebird|Firebird]]
* [[#github|GitHub]]
* [[#mongo-logs|Mongo logs]]

&lt;span id="paid-plan">&lt;/span>
==== Paid Plan ====

* [[#apache-hive|Apache Hive]]
* [[#azure-active-directory|Azure Active Directory]]
* [[#ibm-db2|IBM Db2]]
* [[#ibm-informix|IBM Informix]]
* [[#ldap--active-directory|LDAP &amp;amp; Active Directory]]
* [[#mqtt|MQTT]]
* [[#oracle|Oracle]]
* [[#sap-sql-anywhere|SAP SQL Anywhere]]
* [[#snowflake|Snowflake]]
* [[#microsoft-sql-server|SQL Server]]

&lt;span id="cassandra">&lt;/span>
=== Cassandra ===

'''Likelihood Of Impact: High'''

To use the Cassandra service, you must recompile the driver and install the client library if you haven't already.

[https://github.com/datastax/cpp-driver/releases/tag/2.16.2 Download] and extract the client library for Apache Cassandra. From the downloaded repository, run the following commands:

&lt;syntaxhighlight lang="bash">sudo apt install -y --no-install-recommends libgmp-dev libpcre3-dev libssl-dev libuv1-dev cmake&lt;/syntaxhighlight>
&lt;syntaxhighlight lang="bash">mkdir build       &amp;&amp;\
pushd build       &amp;&amp;\
cmake ..          &amp;&amp;\
make              &amp;&amp;\
sudo make install &amp;&amp;\
popd&lt;/syntaxhighlight>
[https://github.com/nano-interactive/ext-cassandra/tree/v1.3.x Download] the DataStax PHP Driver for Apache Cassandra. '''Make sure that you are on the 1.3.x branch.''' From the downloaded repository, run the following command:

&lt;syntaxhighlight lang="bash"># Currently, we are using a specific version of the repository that is still functional,
# as the recent efforts to enhance the installation process do not work properly.
git checkout 1cf12c5ce49ed43a2c449bee4b7b23ce02a37bf0 &amp;&amp;\
pushd ext         &amp;&amp;\
phpize            &amp;&amp;\
popd              &amp;&amp;\
mkdir build       &amp;&amp;\
pushd build       &amp;&amp;\
../ext/configure  &amp;&amp;\
make              &amp;&amp;\
sudo make install &amp;&amp;\
popd&lt;/syntaxhighlight>
Make sure &lt;code>cassandra.so&lt;/code> is built.

&lt;pre>find /usr/lib/php/20210902/cassandra.so&lt;/pre>
If &lt;code>cassandra.so&lt;/code> exists, connect it to PHP's modules.

&lt;syntaxhighlight lang="text">
echo 'extension=cassandra.so' | sudo tee /etc/php/8.1/mods-available/cassandra.ini
sudo phpenmod -v 8.1 -s ALL cassandra
&lt;/syntaxhighlight>
&lt;span id="couchbase">&lt;/span>
=== Couchbase ===

'''Likelihood Of Impact: High'''

With the new release of DreamFactory, we removed Couchbase from the list of supported services. There is a possibility that support for Couchbase may be reinstated in a future release.

&lt;span id="email">&lt;/span>
=== Email ===

'''Likelihood Of Impact: Low'''

The Mandrill &amp;amp; SparkPost mail drivers have been [https://laravel.com/docs/6.x/upgrade removed from Laravel 6]. These services have technically not been supported by DreamFactory since its migration to Laravel 6. For this reasone these services are no longer displayed in the '''Services''' tab.

&lt;span id="firebird">&lt;/span>
=== Firebird ===

'''Likelihood Of Impact: High'''

If you are using Firebird with major version 3, then it must be at least version 3.0.4. This is due to usage of the [https://firebirdsql.org/file/documentation/chunk/en/refdocs/fblangref40/fblangref40-contextvars-localtimestamp.html LOCALTIMESTAMP parameter].

To use the Firebird service, you need to install/recompile a driver compatible with PHP 8.1. Use [https://www.php.net/manual/en/ref.pdo-firebird.php &lt;code>--with-pdo-firebird&lt;/code>] to install the PDO Firebird extension or install &lt;code>php81-interbase&lt;/code> package from [[#installing-the-php-extension|ppa:ondrej/php]].

&lt;span id="github">&lt;/span>
=== GitHub ===

'''Likelihood Of Impact: Medium'''

DreamFactory provided the ability to authenticate through the REST API using an account password or personal access token to perform authenticated API operations on GitHub.com. Beginning November 13th, 2020, GitHub announced that they no longer accept account passwords when authenticating via the REST API and require the use of token-based authentication. If you have a registered DreamFactory GitHub service, ensure to specify a personal access token. For more information, follow the Deprecating password authentication information found [https://developer.github.com/changes/2020-02-14-deprecating-password-auth/ here].

&lt;span id="mongo-logs">&lt;/span>
=== Mongo logs ===

'''Likelihood Of Impact: Low'''

DreamFactory supports a very simple solution for logging all requests. All records requested in the API are written to the database. The implication is that DreamFactory relies on [https://www.mongodb.com/docs/drivers/php/ MongoDB PHP driver]. You can easily install the required dependency with [https://pecl.php.net/package/mongodb pecl]. After that, run these two commands:

&lt;syntaxhighlight lang="bash">echo 'extension=mongodb.so' | sudo tee /etc/php/8.1/mods-available/mongodb.ini
sudo phpenmod -s ALL mongodb&lt;/syntaxhighlight>
&lt;span id="apache-hive">&lt;/span>
=== Apache Hive ===

'''Likelihood Of Impact: High'''

In order to use the service, you must have both the [https://www.php.net/manual/en/pdo.installation.php PDO] and [https://www.php.net/manual/en/odbc.installation.php ODBC] PHP extensions installed, which are available for download from [[#installing-the-php-extension|this PPA]] with the names &lt;code>php8.1-pdo&lt;/code> and &lt;code>php8.1-odbc&lt;/code>, respectively. Additionally, the MapR ODBC Driver must be installed, which you can obtain by downloading from this [https://docs.datafabric.hpe.com/70/Hive/install-hive_odbc_connector_linux.html link] or through the Amazon cloud, as we do. To install MapR ODBC Driver run:

&lt;syntaxhighlight lang="bash">cd /opt \
&amp;&amp; sudo curl --fail -O https://odbc-drivers.s3.amazonaws.com/apache-hive/maprhiveodbc_2.6.1.1001-2_amd64.deb \
&amp;&amp; sudo dpkg -i maprhiveodbc_2.6.1.1001-2_amd64.deb \
&amp;&amp; test -f /opt/mapr/hiveodbc/lib/64/libmaprhiveodbc64.so \
&amp;&amp; rm maprhiveodbc_2.6.1.1001-2_amd64.deb&lt;/syntaxhighlight>
Note that it's crucial to install the extension using a specific path. So the full path to the driver must be - &lt;code>/opt/mapr/hiveodbc/lib/64/libmaprhiveodbc64.so&lt;/code>

&lt;span id="azure-active-directory">&lt;/span>
=== Azure Active Directory ===

'''Likelihood Of Impact: Low'''

Microsoft announced that Azure AD Graph has been deprecated as of June 30, 2023. For this reason, DreamFactory migrated towards Microsoft Graph. For more information, follow the details available [https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/microsoft-entra-change-announcements-september-2022-train/ba-p/2967454 here].

&lt;span id="ibm-db2">&lt;/span>
=== IBM Db2 ===

'''Likelihood Of Impact: High'''

DreamFactory services that work with IBM databases use software that can be loaded from [https://www.ibm.com/us-en/ ibm.com]. This section is appointed for a self-hosted environment. To make DreamFactory work with the IBM Db2, you need to complete the following steps:

Sign in to your [https://www.ibm.com/us-en/ IBM] account, or create a new one. Download the client driver package:

https://epwt-www.mybluemix.net/software/support/trial/cst/programwebsite.wss?siteId=853&amp;amp;h=null&amp;amp;p=null

Extract the downloaded file. From the "dsdriver" subdirectory, generate "''db2profile''" and "''db2cshrc''" script files:

&lt;syntaxhighlight lang="bash">sudo -s \
&amp;&amp; tar -xvf ibm_data_server_driver_package_linuxx64_v11.5.tar.gz -C /opt/ \
&amp;&amp; cd /opt/dsdriver \
&amp;&amp; apt install -y ksh \
&amp;&amp; ./installDSDriver&lt;/syntaxhighlight>
Set the environment variables using:

&lt;syntaxhighlight lang="text">
source db2profile (for the Bash or Korn shell)
source db2cshrc (for the C shell)
&lt;/syntaxhighlight>
Clone the PDO_IBM [https://github.com/php/pecl-database-pdo_ibm source code from GitHub]. '''Note that this must be done from the same terminal since db2profile | db2cshrc sets the environment variables in the current terminal session.'''

&lt;syntaxhighlight lang="bash">git clone https://github.com/php/pecl-database-pdo_ibm /opt/PDO_IBM &amp;&amp; \
cd /opt/PDO_IBM&lt;/syntaxhighlight>
From the cloned repository run:

&lt;syntaxhighlight lang="bash">export CPATH=/opt/dsdriver/include&lt;/syntaxhighlight>
&lt;syntaxhighlight lang="bash">phpize \
&amp;&amp; ./configure --with-pdo-ibm=/opt/dsdriver \
&amp;&amp; make \
&amp;&amp; make install \
&amp;&amp; exit&lt;/syntaxhighlight>
Check for the presence of &lt;code>pdo_ibm.so&lt;/code>:

&lt;syntaxhighlight lang="bash">find "/usr/lib/php/20210902/pdo_ibm.so"&lt;/syntaxhighlight>
If &lt;code>pdo_ibm.so&lt;/code> exists, connect it to PHP's modules:

&lt;syntaxhighlight lang="bash">echo 'extension=pdo_ibm.so' | sudo tee /etc/php/8.1/mods-available/pdo_ibm.ini &amp;&amp; \
sudo phpenmod -v 8.1 -s ALL pdo_ibm&lt;/syntaxhighlight>
&lt;span id="ibm-informix">&lt;/span>
=== IBM Informix ===

'''Likelihood Of Impact: High'''

DreamFactory services that work with IBM databases use software that can be loaded from [https://www.ibm.com/us-en/ ibm.com]. This section is appointed for a self-hosted environment. To make DreamFactory work with the IBM Informix, you need to take the following steps:

Sign in to your [https://www.ibm.com/us-en/ IBM] account or create a new one. Download the [https://www.ibm.com/support/pages/informix-client-software-development-kit-client-sdk-and-informix-connect-system-requirements Informix Client SDK].

&lt;u>Download Informix Client SDK&lt;/u> ➜ &lt;u>IBM Informix Client SDK downloads&lt;/u> ➜ ''Fill out the form'' ➜ ''Select appropriate version'' ➜ ''Download tar file''

SDK may require you to install &lt;code>libncurses.so.5&lt;/code>:

&lt;syntaxhighlight lang="bash">
sudo add-apt-repository universe
sudo apt update
sudo apt install libncurses5 libncurses5:i386
&lt;/syntaxhighlight>
Extract and install the SDK:

&lt;syntaxhighlight lang="bash">
sudo -s
tar -xvf your_archive
./installclientsdk
&lt;/syntaxhighlight>
Now we have two options to install &lt;code>pdo_informix.so&lt;/code>: using &lt;code>pecl&lt;/code> or by building it manually. We prefer the second method since we have had limited success with the &lt;code>pecl&lt;/code> method.

Download the [https://pecl.php.net/package/pdo_informix PDO_INFORMIX] archive and extract it. From the extracted ''PDO_INFORMIX-1.3.x'' folder run:

&lt;syntaxhighlight lang="bash">phpize \
&amp;&amp; ./configure --with-pdo-informix=/opt/IBM/Informix_Client-SDK \
&amp;&amp; make \
&amp;&amp; make install \
&amp;&amp; exit&lt;/syntaxhighlight>
If you decide to test your luck, and install [https://pecl.php.net/package/pdo_informix PDO_INFORMIX] using &lt;code>pecl&lt;/code>, run:

&lt;syntaxhighlight lang="bash">sudo pecl install PDO_INFORMIX&lt;/syntaxhighlight>
Set the environment variables in &lt;code>.profile&lt;/code>, and open the file for editing with:

&lt;syntaxhighlight lang="bash">sudo nano ~/.profile&lt;/syntaxhighlight>
Add the following lines to the bottom of the file:

&lt;syntaxhighlight lang="text">
export LD_LIBRARY_PATH=&amp;quot;$LD_LIBRARY_PATH:/opt/IBM/Informix_Client-SDK/lib:/opt/IBM/Informix_Client-SDK/lib/esql&amp;quot;
export INFORMIXDIR=&amp;quot;/opt/IBM/Informix_Client-SDK&amp;quot;
&lt;/syntaxhighlight>
Make sure &lt;code>pdo_informix.so&lt;/code> is built using:

&lt;syntaxhighlight lang="bash">find /usr/lib/php/20210902/pdo_informix.so&lt;/syntaxhighlight>
If &lt;code>pdo_informix.so&lt;/code> exists, connect it to PHP's modules with:

&lt;syntaxhighlight lang="bash">echo 'extension=pdo_informix.so' | sudo tee /etc/php/8.1/mods-available/pdo_informix.ini &amp;&amp; \
sudo phpenmod -v 8.1 -s ALL pdo_informix&lt;/syntaxhighlight>
&lt;span id="ldap-active-directory">&lt;/span>
=== LDAP &amp;amp; Active Directory ===

'''Likelihood Of Impact: Low'''

DreamFactory uses [https://www.php.net/manual/en/book.ldap.php Lightweight Directory Access Protocol] to lookup information or devices within a network. Therefore, to continue working with these services, you need to install the LDAP [https://www.php.net/manual/en/ldap.installation.php extension] for the new version of PHP. For a quick setup, see the [[#installing-the-php-extension|'Installing the PHP extension']] section.

&lt;span id="mqtt">&lt;/span>
=== MQTT ===

'''Likelihood Of Impact: Low'''

Previously, the MQTT service relied on the [https://github.com/mgdm/Mosquitto-PHP Mosquitto-PHP] extension, which in turn relies upon the [https://mosquitto.org/ libmosquitto] library. This service no longer depends on the system's needs and contains everything needed to work on its own.

&lt;span id="oracle">&lt;/span>
=== Oracle ===

'''Likelihood Of Impact: High'''

This section shows the minimum number of steps to set up required dependencies so that DreamFactory can work with Oracle. For a complete setup, follow the [https://www.oracle.com/database/technologies/releasenote-odbc-ic.html official guide].
To use the Oracle service, you need to install the new version of the &lt;code>oci8&lt;/code> extension compatible with PHP 8.1. You can seamlessly install the required extension version you need via [https://pecl.php.net/package/oci8 pecl]. But before installation, you need to go through a few more steps:

Download the desired Instant Client and the corresponding SDK Package. This example uses the RPM packages.

https://www.oracle.com/database/technologies/instant-client/downloads.html

Install the necessary dependencies using:

&lt;syntaxhighlight lang="bash">sudo apt install -y alien libaio1&lt;/syntaxhighlight>
Install the Oracle client packages, which can take a few minutes, with this command:

&lt;syntaxhighlight lang="bash">
sudo alien -i oracle-instantclient-basic-21.9.0.0.0-1.el8.x86_64.rpm
sudo alien -i oracle-instantclient-devel-21.9.0.0.0-1.el8.x86_64.rpm
&lt;/syntaxhighlight>
Now you are ready to install the &lt;code>oci8&lt;/code> extension. The latest version is compatible with PHP 8.1 at present, but you may need to specify the version explicitly.

&lt;syntaxhighlight lang="bash">
sudo pecl install oci8 (php 8.1 exactly what we need)
sudo pecl install oci8-2.2.0 (php 7)
&lt;/syntaxhighlight>
Once complete, make sure that OCI is loaded:

&lt;syntaxhighlight lang="bash">php -m | grep oci8

#oci8&lt;/syntaxhighlight>
If you do not see &lt;code>oci8&lt;/code> in PHP's modules, ensure that the configuration file and the OCI shared library file are plugged in.

Check for the presence of &lt;code>osi8.so&lt;/code>:

&lt;syntaxhighlight lang="bash">find "/usr/lib/php/20210902/oci8.so"&lt;/syntaxhighlight>
If &lt;code>osi8.so&lt;/code> exists, connect it to PHP's modules by running:

&lt;syntaxhighlight lang="bash">echo 'extension=oci8.so' | sudo tee /etc/php/8.1/mods-available/oci8.ini &amp;&amp; \
sudo phpenmod -v 8.1 -s ALL oci8&lt;/syntaxhighlight>
&lt;span id="sap-sql-anywhere">&lt;/span>
=== SAP SQL Anywhere ===

'''Likelihood Of Impact: High'''

To complete this process, install the Sybase module from PPA. See the [[#installing-the-php-extension|how to add PPA to your Apt repositories]] section. This package provides &lt;code>php8.1-pdo-dblib&lt;/code>, which is what is needed.

&lt;syntaxhighlight lang="bash">sudo apt install php8.1-sybase&lt;/syntaxhighlight>
Once complete, make sure that the driver is installed successfully. Confirm both PDO and the pdo_dblib extensions are present:

&lt;syntaxhighlight lang="bash">php -m
...
#PDO
#pdo_dblib
...&lt;/syntaxhighlight>
&lt;span id="snowflake">&lt;/span>
=== Snowflake ===

'''Likelihood Of Impact: High'''

To use the Snowflake service, you need to recompile the &lt;code>pdo_snowflake&lt;/code> driver using the new PHP version. After completion, make sure the module is installed into the proper extensions directory. For more infomation you can access the official guide [https://github.com/snowflakedb/pdo_snowflake here].

&lt;span id="microsoft-sql-server">&lt;/span>
=== Microsoft SQL Server ===

'''Likelihood Of Impact: High'''

&lt;blockquote>To use a Microsoft SQL Server database, you should ensure that you have the sqlsrv and pdo_sqlsrv PHP extensions installed, as well as any dependencies they may require such as the Microsoft SQL ODBC driver.
&lt;/blockquote>
Install ODBC libraries for UNIX from the [https://learn.microsoft.com/en-us/windows-server/administration/linux-package-repository-for-microsoft-software Microsoft repository]:

&lt;syntaxhighlight lang="bash">sudo apt install -y unixodbc-dev&lt;/syntaxhighlight>
If you are encountering issues with the &lt;code>unixodbc-dev&lt;/code> package, it may be due to a recent release. As a workaround, you can lock the package version to a stable one (e.g. v2.3.7) until a fix is released. For more details, refer to the relevant [https://github.com/microsoft/linux-package-repositories/issues/36 issue].

Install [https://pecl.php.net/package/sqlsrv sqlsrv] and [https://pecl.php.net/package/pdo_sqlsrv pdo_sqlsrv] from pecl:

&lt;syntaxhighlight lang="bash">
sudo pecl install sqlsrv
sudo pecl install pdo_sqlsrv
&lt;/syntaxhighlight>
Check for the presence of &lt;code>sqlsrv&lt;/code> and &lt;code>pdo_sqlsrv&lt;/code>:

&lt;syntaxhighlight lang="text">
find &amp;quot;/usr/lib/php/20210902/sqlsrv.so&amp;quot;
find &amp;quot;/usr/lib/php/20210902/pdo_sqlsrv.so&amp;quot;
&lt;/syntaxhighlight>
If you get both SO files, connect it to PHP's modules:

&lt;syntaxhighlight lang="text">
echo 'extension=sqlsrv.so' | sudo tee /etc/php/8.1/mods-available/sqlsrv.ini
sudo phpenmod -v 8.1 -s ALL sqlsrv

echo 'extension=pdo_sqlsrv.so' | sudo tee /etc/php/8.1/mods-available/pdo_sqlsrv.ini
sudo phpenmod -v 8.1 -s ALL pdo_sqlsrv
&lt;/syntaxhighlight>
Finally, install the Microsoft ODBC driver for SQL Server following the [https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16#ubuntu18 official guide], or using the [https://pkgs.org/search/?q=msodbcsql Microsoft repository].

&lt;span id="installing-the-php-extension">&lt;/span>
=== Installing the PHP extension ===

Installation of the necessary dependencies can be quite an agonizing process, so concerned people make this process as painless as possible. [https://deb.sury.org/ Ondřej Surý] maintains the repository with PHP packages and is a very well-respected contributor to the PHP community. See how you can install the required PHP dependencies in three easy steps.

First add [https://launchpad.net/~ondrej/+archive/ubuntu/php &lt;code>ppa:ondrej/php&lt;/code>] to our APT repositories with:

&lt;syntaxhighlight lang="bash">sudo add-apt-repository ppa:ondrej/php&lt;/syntaxhighlight>
Update list of available packages:

&lt;syntaxhighlight lang="bash">sudo apt update&lt;/syntaxhighlight>
Install the required dependency. In this example, we demonstrate the installation of the [https://www.php.net/manual/en/book.ldap.php LDAP] extension:

&lt;syntaxhighlight lang="bash">sudo apt install php8.1-ldap&lt;/syntaxhighlight>

== See also ==
* [[Upgrading_Php_Windows|Upgrading PHP On Windows]]
* [[Upgrading_Migrating_Dreamfactory|Upgrading and Migrating DreamFactory]]

[[Category:Upgrades]]
[[Category:Upgrading]]
Return to [Upgrading To Php 8 1](/Upgrading_To_Php_8_1).

Retrieved from "[https://wiki.dreamfactory.com/Upgrading_To_Php_8_1](https://wiki.dreamfactory.com/Upgrading_To_Php_8_1)"