# Import Error on Module x509

**URL:** <https://community.icinga.com/t/import-error-on-module-x509/9409>\
**Category:** Icinga Web Modules\
**Tags:** x509\
**Created:** [March 11, 2022, 7:07am UTC](https://community.icinga.com/t/import-error-on-module-x509/9409 "2022-03-11T07:07:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ExeLeNtCrypt](https://community.icinga.com/letter_avatar_proxy/v4/letter/e/97f17d/32.png) [@ExeLeNtCrypt](https://community.icinga.com/u/ExeLeNtCrypt)\
**Post date:** [March 11, 2022, 7:07am UTC](https://community.icinga.com/t/import-error-on-module-x509/9409/1 "2022-03-11T07:07:58Z")

</div>

Hello everyone, i am trying to install the module “x509”.  
but i get the following error when executing the command

```auto
]# icingacli x509 import --file /etc/ssl/certs/ca-certificates.crt --debug -trace
Importing certificate: /C=BR/O=ICP-Brasil/OU=Instituto Nacional de Tecnologia da Informacao - ITI/L=Brasilia/ST=DF/CN=Autoridade Certificadora Raiz Brasileira
PHP Fatal error: Uncaught Error: Call to undefined function Icinga\Module\X509\gmp_export() in /usr/share/icingaweb2/modules/x509/library/X509/CertificateUtils.php:243
Stack trace:
#0 /usr/share/icingaweb2/modules/x509/application/clicommands/ImportCommand.php(43): Icinga\Module\X509\CertificateUtils::findOrInsertCert(Object(ipl\Sql\Connection), Resource id #123)
#1 [internal function]: Icinga\Module\X509\Clicommands\ImportCommand->Icinga\Module\X509\Clicommands\{closure}(Object(ipl\Sql\Connection))
#2 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(539): call_user_func(Object(Closure), Object(ipl\Sql\Connection))
#3 /usr/share/icingaweb2/modules/x509/application/clicommands/ImportCommand.php(53): ipl\Sql\Connection->transaction(Object(Closure))
#4 /usr/share/php/Icinga/Cli/Loader.php(267): Icinga\Module\X509\Clicommands\ImportCommand->indexAction()
#5 /usr/share/php/Icinga/Application/Cli.php(164): Icinga\Cli\Loader->dispatch()
#6 /usr/share/php/Icinga/Application/Cli.php(154): Icinga\Application\Cli->dispatchOnc in /usr/share/icingaweb2/modules/x509/library/X509/CertificateUtils.php on line 243

Fatal error: Uncaught Error: Call to undefined function Icinga\Module\X509\gmp_export() in /usr/share/icingaweb2/modules/x509/library/X509/CertificateUtils.php:243
Stack trace:
#0 /usr/share/icingaweb2/modules/x509/application/clicommands/ImportCommand.php(43): Icinga\Module\X509\CertificateUtils::findOrInsertCert(Object(ipl\Sql\Connection), Resource id #123)
#1 [internal function]: Icinga\Module\X509\Clicommands\ImportCommand->Icinga\Module\X509\Clicommands\{closure}(Object(ipl\Sql\Connection))
#2 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(539): call_user_func(Object(Closure), Object(ipl\Sql\Connection))
#3 /usr/share/icingaweb2/modules/x509/application/clicommands/ImportCommand.php(53): ipl\Sql\Connection->transaction(Object(Closure))
#4 /usr/share/php/Icinga/Cli/Loader.php(267): Icinga\Module\X509\Clicommands\ImportCommand->indexAction()
#5 /usr/share/php/Icinga/Application/Cli.php(164): Icinga\Cli\Loader->dispatch()
#6 /usr/share/php/Icinga/Application/Cli.php(154): Icinga\Application\Cli->dispatchOnc in /usr/share/icingaweb2/modules/x509/library/X509/CertificateUtils.php on line 243

```

Icinga Web 2 version: 2.9.6  
Icinga 2 version: 2.13.2  
PHP version: 7.4  
OS: Centos 7

Modules:  
incubator 0.6.0  
ipl 0.5.0  
reactbundle 0.9.0

Thanks in Advance 🙂

---

<div class="post-metadata">

**Author:** ![nilmerg](https://community.icinga.com/user_avatar/community.icinga.com/nilmerg/32/277_2.png) [@nilmerg](https://community.icinga.com/u/nilmerg)\
**Post date:** [March 11, 2022, 7:46am UTC](https://community.icinga.com/t/import-error-on-module-x509/9409/2 "2022-03-11T07:46:46Z")

</div>

Hi,

one of the [requirements](https://github.com/Icinga/icingaweb2-module-x509/blob/master/doc/02-Installation.md#requirements) is the gmp php-extension. It seems you have not installed it or it’s not properly loaded by php.

---

<div class="post-metadata">

**Author:** ![ExeLeNtCrypt](https://community.icinga.com/letter_avatar_proxy/v4/letter/e/97f17d/32.png) [@ExeLeNtCrypt](https://community.icinga.com/u/ExeLeNtCrypt)\
**Post date:** [March 11, 2022, 8:17am UTC](https://community.icinga.com/t/import-error-on-module-x509/9409/3 "2022-03-11T08:17:38Z")

</div>

Hi, thanks for the quick reply.

gmp php-extension is installed.

---

<div class="post-metadata">

**Author:** ![nilmerg](https://community.icinga.com/user_avatar/community.icinga.com/nilmerg/32/277_2.png) [@nilmerg](https://community.icinga.com/u/nilmerg)\
**Post date:** [March 11, 2022, 8:44am UTC](https://community.icinga.com/t/import-error-on-module-x509/9409/4 "2022-03-11T08:44:53Z")

</div>

Just noticed you’re using centos7. Then also php-fpm plays a role. Have you installed gmp for the php-fpm interpreter or the system default one? You should install it for php-fpm. The package name should be `rh-php73-php-gmp`.

---

<div class="post-metadata">

**Author:** ![ExeLeNtCrypt](https://community.icinga.com/letter_avatar_proxy/v4/letter/e/97f17d/32.png) [@ExeLeNtCrypt](https://community.icinga.com/u/ExeLeNtCrypt)\
**Post date:** [March 11, 2022, 8:52am UTC](https://community.icinga.com/t/import-error-on-module-x509/9409/5 "2022-03-11T08:52:47Z")

</div>

that worked thank you very much 🙂
