sajad torkamani

Make sure the extension is installed

Run pecl install <ext-name>. See How to install PHP extensions with PECL for more info.

Usually, this should modify one of your PHP.ini files to add a line like the below:


But if for whatever reason this didn’t happen, read on!

Enable the extension in PHP .ini file

Find a PHP .ini file that’s loaded by your system’s PHP (See List configuration files loaded by PHP), then open it and look for a section that lists a bunch of extensions like:


Add a line for your extension and make sure it’s not commented by removing the ; from the start of the line.

Restart PHP

Restart your web server or PHP-FPM for the PHP.ini change to take effect.

With homebrew on macOS, something like bre services restart php should do the trick.

On Linux, you’ll want to use systemctl or something similar.