Dependencies
This section describes the dependencies for using PHP with the CData ODBC Driver for MongoDB.
Configure unixODBC (Linux Only)
PHP uses unixODBC on Linux, so make sure the driver is configured as described in Using unixODBC before continuing.
Install Unified ODBC
Linux
Most Linux distributions distribute ODBC support in their own packages apart from core PHP. Usually the package is named php-odbc.
# Debian, Ubuntu and related distributions $ apt install php-odbc # Red Hat, CentOS and related distributions $ yum install php-odbc
Windows
On Windows, PHP is typically distributed with built-in ODBC support, so no extra packages are required.
Mac
On recent versions of Mac, the built-in PHP is not compiled with support for ODBC. Refer to the iODBC documentation for instructions on how to compile a version of PHP with iODBC support.