{"id":3676,"date":"2016-05-16T22:46:48","date_gmt":"2016-05-17T02:46:48","guid":{"rendered":"https:\/\/underhost.com\/blog\/?p=3676"},"modified":"2026-10-23T08:55:40","modified_gmt":"2026-10-23T12:55:40","slug":"install-gmp-cpanel-centos-servers","status":"publish","type":"post","link":"https:\/\/underhost.com\/blog\/install-gmp-cpanel-centos-servers\/","title":{"rendered":"How to Install the PHP GMP Extension on a cPanel Server (EasyApache 4)"},"content":{"rendered":"<div class=\"uh-blog-hero\" style=\"margin:0 0 40px;text-align:center;padding:48px 24px;border-radius:20px;background:linear-gradient(135deg,#0D1F3C 0%,#125A8A 58%,#176EA5 100%);color:#ffffff;box-shadow:0 20px 40px -15px rgba(13,31,60,0.28);position:relative;overflow:hidden;\">\n<div style=\"display:inline-flex;align-items:center;gap:8px;padding:7px 14px;margin-bottom:16px;border:1px solid rgba(0,212,255,0.32);border-radius:999px;color:#DFF8FF;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;background:rgba(0,212,255,0.10);\"><i class=\"fas fa-cogs\" style=\"color:#00D4FF;\"><\/i> cPanel &amp; WHM<\/div>\n<h1 style=\"color:#ffffff;font-size:clamp(32px,5vw,46px);line-height:1.12;margin:0 0 14px;font-weight:800;\">How to Install the PHP GMP Extension on a cPanel Server (EasyApache 4)<\/h1>\n<p style=\"font-size:18px;color:#EAF6FF;max-width:800px;margin:0 auto;line-height:1.7;\">Install GNU MP (GMP) on your cPanel server for high-performance arithmetic and cryptographic applications.<\/p>\n<\/div>\n<div class=\"uh-blog-excerpt\" style=\"border-left:4px solid #00D4FF;padding:18px 20px;margin:0 0 34px;background:#F8FAFC;color:#1F2937;border-radius:0 14px 14px 0;box-shadow:0 8px 28px rgba(13,31,60,0.08);line-height:1.75;\"><strong style=\"color:#0D1F3C;\">Short answer:<\/strong> On a cPanel server, install GMP through EasyApache 4. In WHM, open <strong>Software &gt; EasyApache 4<\/strong>, click <strong>Customize<\/strong>, open <strong>PHP Extensions<\/strong>, search for <code>gmp<\/code>, enable it for each PHP version your sites use, then review and provision. You can also install the package from the command line. Confirm it with <code>php -m<\/code>.<\/div>\n<nav aria-label=\"Table of contents\" class=\"uh-toc\" style=\"background:#ffffff;border:1px solid #E5E7EB;border-radius:16px;padding:20px 22px;margin:0 0 34px;box-shadow:0 4px 12px rgba(13,31,60,0.08);\">\n<div style=\"font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#176EA5;margin-bottom:10px;\"><i class=\"fas fa-list\" style=\"color:#00D4FF;\"><\/i> In this guide<\/div>\n<ol style=\"margin:0;padding-left:20px;columns:2 260px;column-gap:28px;line-height:1.9;\">\n<li><a href=\"#what-gmp-is-and-why-applications-need-it\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">What GMP is and why applications need it<\/a><\/li>\n<li><a href=\"#gmp-or-bcmath\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">GMP or BCMath?<\/a><\/li>\n<li><a href=\"#before-you-start\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Before you start<\/a><\/li>\n<li><a href=\"#method-1-install-gmp-in-whm-easyapache-4\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Method 1: install GMP in WHM (EasyApache 4)<\/a><\/li>\n<li><a href=\"#method-2-install-gmp-from-the-command-line\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Method 2: install GMP from the command line<\/a><\/li>\n<li><a href=\"#method-3-cloudlinux-php-selector-alt-php\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Method 3: CloudLinux PHP Selector (alt-php)<\/a><\/li>\n<li><a href=\"#check-that-gmp-is-loaded\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Check that GMP is loaded<\/a><\/li>\n<li><a href=\"#troubleshooting\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Troubleshooting<\/a><\/li>\n<li><a href=\"#keep-php-itself-up-to-date\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Keep PHP itself up to date<\/a><\/li>\n<\/ol>\n<\/nav>\n<div class=\"uh-post-content\" style=\"color:#1F2937;font-size:16px;line-height:1.75;\">\n<h2 id=\"what-gmp-is-and-why-applications-need-it\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-info-circle\" style=\"color:#00D4FF;\"><\/i> What GMP is and why applications need it<\/h2>\n<p style=\"margin:0 0 18px;\">GMP stands for the GNU Multiple Precision Arithmetic Library. It works with integers far larger than the 64-bit numbers PHP handles natively. The PHP <code>gmp<\/code> extension exposes this library to PHP code through functions such as <code>gmp_add()<\/code>, <code>gmp_mul()<\/code> and <code>gmp_powm()<\/code>.<\/p>\n<p style=\"margin:0 0 18px;\">Applications ask for GMP when they need exact maths on very large numbers. Typical examples are cryptography libraries, which can use GMP to speed up key operations, and code that calculates with large IDs or IPv6 address ranges. If an installer or plugin reports that the GMP extension is missing, it needs this extension enabled for the PHP version the site runs on.<\/p>\n<h2 id=\"gmp-or-bcmath\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> GMP or BCMath?<\/h2>\n<p style=\"margin:0 0 18px;\">PHP has a second extension for large numbers, BCMath. The two are often confused, and some applications accept either one.<\/p>\n<div style=\"overflow-x:auto;margin:26px 0;border:1px solid #E5E7EB;border-radius:14px;-webkit-overflow-scrolling:touch;\">\n<table style=\"width:100%;border-collapse:collapse;background:#ffffff;color:#1F2937;font-size:15px;line-height:1.55;margin:0;min-width:600px;\">\n<thead>\n<tr style=\"background:#0D1F3C;color:#fff;\">\n<th style=\"padding:14px;text-align:left;\"><\/th>\n<th style=\"padding:14px;text-align:left;\">GMP<\/th>\n<th style=\"padding:14px;text-align:left;\">BCMath<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Works with<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Whole numbers (integers)<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Decimal numbers stored as strings<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Speed<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Faster for large integer maths, because it uses the GMP C library<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Slower, but needs no external library<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Typical use<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Cryptography, big IDs, IPv6 ranges<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Money and other decimal calculations<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"margin:0 0 18px;\">Check your application&#8217;s requirements. If it asks for GMP, install GMP. If it lists BCMath, install that instead, from the same PHP Extensions page.<\/p>\n<h2 id=\"before-you-start\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-clipboard-check\" style=\"color:#00D4FF;\"><\/i> Before you start<\/h2>\n<ul style=\"list-style:none;padding-left:0;\">\n<li style=\"margin:0 0 8px;\">\u2713 Root access to WHM, or root SSH access to the server.<\/li>\n<li style=\"margin:0 0 8px;\">\u2713 The PHP versions your sites use. Check them in <strong>WHM &gt; Software &gt; MultiPHP Manager<\/strong>.<\/li>\n<li style=\"margin:0 0 8px;\">\u2713 A recent backup. EasyApache 4 rebuilds PHP packages, and a rebuild restarts Apache and PHP-FPM.<\/li>\n<li style=\"margin:0 0 8px;\">\u2713 A quiet time for the change, because sites can be briefly unavailable while services restart.<\/li>\n<\/ul>\n<p style=\"margin:0 0 18px;\">If the server runs CloudLinux with PHP Selector, some accounts may use alt-php instead of the EasyApache 4 PHP versions. The steps for that case are in Method 3.<\/p>\n<h2 id=\"method-1-install-gmp-in-whm-easyapache-4\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Method 1: install GMP in WHM (EasyApache 4)<\/h2>\n<ol style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\">Log in to WHM as root.<\/li>\n<li style=\"margin:0 0 8px;\">Go to <strong>Software &gt; EasyApache 4<\/strong>.<\/li>\n<li style=\"margin:0 0 8px;\">Next to <strong>Currently Installed Packages<\/strong>, click <strong>Customize<\/strong>.<\/li>\n<li style=\"margin:0 0 8px;\">Open the <strong>PHP Extensions<\/strong> page.<\/li>\n<li style=\"margin:0 0 8px;\">Search for <code>gmp<\/code>. One row appears for each installed PHP version.<\/li>\n<li style=\"margin:0 0 8px;\">Turn on the GMP row for every PHP version your sites use.<\/li>\n<li style=\"margin:0 0 8px;\">Click <strong>Review<\/strong>, check the list of changes, then click <strong>Provision<\/strong>.<\/li>\n<li style=\"margin:0 0 8px;\">Wait for provisioning to finish. EasyApache 4 restarts Apache and PHP-FPM when it is done.<\/li>\n<\/ol>\n<p style=\"margin:0 0 18px;\">Enable GMP for each PHP version separately. A site on PHP 8.3 will not see an extension installed only for PHP 8.4.<\/p>\n<h2 id=\"method-2-install-gmp-from-the-command-line\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Method 2: install GMP from the command line<\/h2>\n<p style=\"margin:0 0 18px;\">EasyApache 4 PHP versions are installed as packages, so you can add GMP with the package manager. Package names follow the PHP version, so search for the exact name on your server before you install it.<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code># 1. List the EasyApache 4 PHP versions installed on the server\nls \/opt\/cpanel | grep ea-php\n\n# 2. Find the GMP package for one version (PHP 8.3 in this example)\ndnf list available 'ea-php83-php-*' | grep -i gmp      # AlmaLinux, Rocky Linux, CloudLinux 8 and later\nyum list available 'ea-php83-php-*' | grep -i gmp      # CloudLinux 7\n\n# 3. Install the package the search returned\ndnf install ea-php83-php-gmp\n\n# 4. Restart PHP-FPM so it loads the new extension\n\/scripts\/restartsrv_apache_php_fpm<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">Repeat steps 2 and 3 for each PHP version your sites use. If the search returns nothing, that PHP version may not offer GMP, or the server cannot reach the cPanel repositories. Check the repository setup before you try another method.<\/p>\n<h2 id=\"method-3-cloudlinux-php-selector-alt-php\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Method 3: CloudLinux PHP Selector (alt-php)<\/h2>\n<p style=\"margin:0 0 18px;\">On CloudLinux servers with PHP Selector, an account can run an alt-php version instead of an EasyApache 4 version. In that case, enable the extension for the account:<\/p>\n<ol style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\">Log in to cPanel for the account.<\/li>\n<li style=\"margin:0 0 8px;\">Open <strong>Select PHP Version<\/strong> (PHP Selector).<\/li>\n<li style=\"margin:0 0 8px;\">Check that the selected version is the one the site uses.<\/li>\n<li style=\"margin:0 0 8px;\">Open the <strong>Extensions<\/strong> list, tick <strong>gmp<\/strong>, and save.<\/li>\n<\/ol>\n<p style=\"margin:0 0 18px;\">If you are not sure which PHP an account runs, compare the version shown in MultiPHP Manager with the one in PHP Selector. Only one of them is active for the site.<\/p>\n<h2 id=\"check-that-gmp-is-loaded\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-clipboard-check\" style=\"color:#00D4FF;\"><\/i> Check that GMP is loaded<\/h2>\n<p style=\"margin:0 0 18px;\">Check each PHP version directly, because the <code>php<\/code> command on the server may point to a different version than your site uses.<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code># EasyApache 4 PHP 8.3\n\/opt\/cpanel\/ea-php83\/root\/usr\/bin\/php -m | grep -i gmp\n\n# The default php command\nphp -m | grep -i gmp<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">Each command should print <code>gmp<\/code>. To check from the site itself, create a temporary file in its document root with <code>&lt;?php phpinfo();<\/code>, open it in a browser, and search the page for &#8220;gmp&#8221;. Delete the file straight away, because it shows details about your server.<\/p>\n<h2 id=\"troubleshooting\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-exclamation-triangle\" style=\"color:#00D4FF;\"><\/i> Troubleshooting<\/h2>\n<div style=\"overflow-x:auto;margin:26px 0;border:1px solid #E5E7EB;border-radius:14px;-webkit-overflow-scrolling:touch;\">\n<table style=\"width:100%;border-collapse:collapse;background:#ffffff;color:#1F2937;font-size:15px;line-height:1.55;margin:0;min-width:600px;\">\n<thead>\n<tr style=\"background:#0D1F3C;color:#fff;\">\n<th style=\"padding:14px;text-align:left;\">Problem<\/th>\n<th style=\"padding:14px;text-align:left;\">Likely cause<\/th>\n<th style=\"padding:14px;text-align:left;\">What to do<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">GMP does not appear in EasyApache 4<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">The PHP version does not offer it, or the package list is out of date<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Run the package search from Method 2. Update the server with <code>\/scripts\/upcp<\/code> if packages are missing.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Installed, but the application still says it is missing<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">The site uses a different PHP version or handler<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Check MultiPHP Manager and PHP Selector, then enable GMP for the version the site actually uses.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Installed, but not loaded after the change<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">PHP-FPM has not restarted<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Run <code>\/scripts\/restartsrv_apache_php_fpm<\/code>, then check again with <code>php -m<\/code>.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Sites fail after provisioning<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Another change was included in the same EasyApache 4 profile<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Review the last provision in EasyApache 4, revert to the previous profile if needed, and restore from backup.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"keep-php-itself-up-to-date\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Keep PHP itself up to date<\/h2>\n<p style=\"margin:0 0 18px;\">Installing an extension is a good moment to check that each PHP version is still supported and patched. See our <a href=\"https:\/\/underhost.com\/blog\/updated-2025-php-version-support-on-cpanel-servers\/\">PHP version support guide<\/a> for the current support dates, and the <a href=\"https:\/\/underhost.com\/blog\/php-security-release-october-2026-patch-guide\/\">PHP critical security update guide<\/a> for the October 2026 fixes. Other extensions are added the same way, as shown in our <a href=\"https:\/\/underhost.com\/blog\/how-can-i-install-curl-on-my-cpanel-server\/\">cURL on cPanel guide<\/a>.<\/p>\n<div aria-hidden=\"true\" class=\"uh-section-divider\" style=\"width:min(100% - 32px, 1080px);margin:44px auto;display:grid;grid-template-columns:1fr 32px 1fr;align-items:center;gap:18px;pointer-events:none;\"><span style=\"height:1px;background:linear-gradient(90deg,transparent,rgba(0,212,255,0.40),rgba(23,110,165,0.24),transparent);\"><\/span><img alt=\"\" decoding=\"async\" height=\"32\" loading=\"lazy\" src=\"https:\/\/cdn.underhost.com\/android-chrome-192x192.webp\" style=\"width:32px;height:32px;display:block;border-radius:8px;filter:drop-shadow(0 0 14px rgba(0,212,255,0.30));\" width=\"32\"\/><span style=\"height:1px;background:linear-gradient(90deg,transparent,rgba(23,110,165,0.24),rgba(0,212,255,0.40),transparent);\"><\/span><\/div>\n<\/div>\n<div class=\"uh-blog-cta\" style=\"background:linear-gradient(135deg,#0D1F3C 0%,#125A8A 58%,#176EA5 100%);color:#ffffff;padding:36px 24px;border-radius:20px;text-align:center;margin:44px 0;box-shadow:0 20px 40px -15px rgba(13,31,60,0.32);\">\n<h2 style=\"margin:0 0 12px;font-size:28px;line-height:1.25;color:#ffffff;\">Need help with this?<\/h2>\n<p style=\"font-size:17px;margin:0 auto 22px;color:#EAF6FF;max-width:720px;line-height:1.7;\">Need GMP or another PHP extension set up for you? Our server management team can install and test it on your server.<\/p>\n<p><a href=\"https:\/\/underhost.com\/server-management.php\" style=\"background:linear-gradient(90deg,#00D4FF,#0077FF);color:#ffffff;padding:13px 28px;border-radius:10px;text-decoration:none;font-weight:800;display:inline-block;margin:8px;\">See server management plans<\/a><a href=\"https:\/\/customerpanel.ca\/client\/\" style=\"background:transparent;color:#ffffff;padding:12px 28px;border-radius:10px;text-decoration:none;font-weight:800;display:inline-block;margin:8px;border:1px solid rgba(255,255,255,0.32);\">Contact @CustomerPanel<\/a><\/div>\n<div class=\"uh-faq-section\" id=\"faq\" style=\"margin:34px 0;scroll-margin-top:90px;\">\n<h2 style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:0 0 18px;border-bottom:2px solid rgba(0,212,255,0.22);padding-bottom:10px;\">Frequently asked questions<\/h2>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Do I need to restart anything after installing GMP?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">EasyApache 4 restarts Apache and PHP-FPM when provisioning finishes. If you installed the package from the command line, restart PHP-FPM with \/scripts\/restartsrv_apache_php_fpm so the extension loads.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Do I have to install GMP for every PHP version?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">Yes. Each PHP version has its own extensions, so enable GMP for every version your sites use.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Why does php -m show GMP but my site says it is missing?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">The command-line php may be a different version from the one the site uses. Check the PHP version for the domain in MultiPHP Manager or PHP Selector, then check that exact version.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Can I still compile GMP from source on cPanel?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">It is not recommended. Compiling extensions by hand bypasses EasyApache 4, so cPanel updates can break or overwrite them. Use the EasyApache 4 packages instead.<\/p>\n<\/div>\n<\/div>\n<p><!-- uh-related-start --><\/p>\n<div style=\"background:#F4F8FC;border:1px solid #DCE7F3;border-radius:14px;padding:18px 22px;margin:32px 0 8px;\">\n<h2 style=\"margin:0 0 12px;font-size:22px;\">Related guides<\/h2>\n<ul style=\"margin:0;padding-left:20px;\">\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/how-can-i-install-curl-on-my-cpanel-server\/\">How to Install cURL on a cPanel Server (EasyApache 4)<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/geoip-and-mod_geoip-installation-on-cpanel-server\/\">IP Geolocation on a cPanel Server: Use the Current MaxMind Tools<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/how-to-install-clamav-cpanel\/\">How to Install and Use ClamAV Antivirus in WHM\/cPanel<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/install-mongodb-cpanel-server\/\">Updated Guide: How to Install MongoDB on a cPanel Server<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/how-to-uninstall-cloudlinux-from-cpanel\/\">How to Install or Uninstall CloudLinux from cPanel (Updated Guide)<\/a><\/li>\n<\/ul>\n<\/div>\n<p><!-- uh-related-end --><br \/>\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Do I need to restart anything after installing GMP?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"EasyApache 4 restarts Apache and PHP-FPM when provisioning finishes. If you installed the package from the command line, restart PHP-FPM with \/scripts\/restartsrv_apache_php_fpm so the extension loads.\"}}, {\"@type\": \"Question\", \"name\": \"Do I have to install GMP for every PHP version?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Yes. Each PHP version has its own extensions, so enable GMP for every version your sites use.\"}}, {\"@type\": \"Question\", \"name\": \"Why does php -m show GMP but my site says it is missing?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"The command-line php may be a different version from the one the site uses. Check the PHP version for the domain in MultiPHP Manager or PHP Selector, then check that exact version.\"}}, {\"@type\": \"Question\", \"name\": \"Can I still compile GMP from source on cPanel?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"It is not recommended. Compiling extensions by hand bypasses EasyApache 4, so cPanel updates can break or overwrite them. Use the EasyApache 4 packages instead.\"}}]}<\/script><\/p>\n<h2 id=\"sources\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-book\" style=\"color:#00D4FF;\"><\/i> Sources<\/h2>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/docs.cpanel.net\/ea4\/basics\/about-easyapache-4\/\">cPanel documentation: About EasyApache 4<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/www.php.net\/manual\/en\/book.gmp.php\">PHP manual: GNU Multiple Precision (GMP)<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/gmplib.org\/\">The GNU Multiple Precision Arithmetic Library<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Install GNU MP (GMP) on your cPanel server for high-performance arithmetic and cryptographic applications.<\/p>\n","protected":false},"author":1,"featured_media":4853,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[202,81,25],"tags":[110,108,187,185,109],"class_list":["post-3676","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel-whm","category-hosting-guides","category-linux","tag-tag-cloudlinux","tag-tag-cpanel","tag-easyapache","tag-php","tag-tag-whm"],"_links":{"self":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/comments?post=3676"}],"version-history":[{"count":11,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3676\/revisions"}],"predecessor-version":[{"id":6941,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3676\/revisions\/6941"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media\/4853"}],"wp:attachment":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media?parent=3676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/categories?post=3676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/tags?post=3676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}