php8.5
Home/ Manual/ reference / pdo/ Installing PDO on Unix systems

Installing PDO on Unix systems

Disable --disable-pdo

Install

Disable --disable-pdo

Installing PDO on Unix systemsPDO and the PDO_SQLITE driver are enabled by default. You may need to enable the PDO driver for your database of choice; consult the documentation for database-specific PDO drivers to find out more about that.When building PDO as a shared extension (not recommended) then all PDO drivers must be loaded after PDO itself.When installing PDO as a shared module, the php.ini file needs to be updated so that the PDO extension will be loaded automatically when PHP runs. You will also need to enable any database specific drivers there too; make sure that they are listed after the extension=pdo line, as PDO must be initialized before the database-specific extensions can be loaded. If you built PDO and the database-specific extensions statically, you can skip this step. extension=pdo Windows usersPDO is enabled by default. Enable the database-specific drivers in Ini as needed. For example, this loads the PDO_SQLITE driver but leaves the PDO_ODBC driver commented out: ;extension=pdo_odbc extension=pdo_sqliteThe corresponding extension files should exist in the extension_dir.

Note

Remember that after making changes to your Ini file you will need to restart PHP for your new configuration directives to take effect.

Source: reference/pdo/configure.xml · from the official PHP manual (php/doc-en)