Documentation

PHP Extensions: Installation and Configuration Guide

Understand PHP extensions, their configuration, and how to verify the modules available to an application.

Overview

PHP extensions add capabilities such as database connectivity, image processing, internationalization, compression and cryptography. Some are bundled with PHP distributions while others may need to be installed or enabled by the hosting environment.

What developers should check

Identify the extension required by your dependency, confirm it is enabled for the same PHP version used by the web server and CLI, and review any extension-specific configuration. A module visible in CLI output is not necessarily enabled for the website's PHP handler.

Verification workflow

Use php -m in the CLI to list loaded modules and php --ri extension_name for extension details. For a web application, verify the runtime configuration through a temporary, access-restricted diagnostic rather than leaving a public phpinfo() page online.

Deployment considerations

Document required extensions in project setup instructions. Check production and staging environments before deployment, and avoid assuming that every hosting provider enables the same modules.

Official resource

PHP Extensions documentation

Share this page Help other developers discover this resource.