Skip to content

Instantly share code, notes, and snippets.

@majidalaeinia
Created September 12, 2021 07:19
Show Gist options
  • Save majidalaeinia/9f05703fbe39b9cc7f7b1b4c39bd1fe6 to your computer and use it in GitHub Desktop.
Save majidalaeinia/9f05703fbe39b9cc7f7b1b4c39bd1fe6 to your computer and use it in GitHub Desktop.
PHP Extension Installation

PHP Extension Installation

  1. sudo apt install php-[ext_name] or sudo pecl install [ext_name].
  2. cd /etc/php/7.4/mods-available and ls to see if the [ext_name].so is available there.
  3. If it's available, then add extension=[ext_name].so; to the php.ini file and then sudo systemctl restart php7.4-fpm.service.
  4. Check php -m | grep [ext_name] to see if it has been installed.
  5. IF NOT: php -i | grep extension_dir and then cd to the path of the returned extension dir.
  6. The [ext_name].so file must be on this path. Copy it to the /etc/php/7.4/mods-available folder and jump to step 2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment