BCMath Installation Guide Print

  • 0

To install BCMath (PHP BCMath extension), use the command based on your OS and PHP version.

Ubuntu / Debian

For the default PHP version:

  • apt update
  • apt install php-bcmath -y

For a specific PHP version:

  • apt install php8.2-bcmath -y

## Replace 8.2 with your installed PHP version if needed.

Restart Web Server

After installation, restart your web server.

Apache

  • systemctl restart apache2

Nginx + PHP-FPM

  • systemctl restart php8.2-fpm
  • systemctl restart nginx

Verify BCMath Installation

  • php -m | grep bcmath

Or:

  • php -i | grep BCMath

Was this answer helpful?

« Back