Php-posix installed and enabled?

Hello,

I have enabled the vsphere module. Using php 7.1
rh-php71-php-soap.x86_64 and rh-php71-php-process.x86_64 are installed
cat /etc/os-release
NAME=“CentOS Linux”
VERSION=“7 (Core)”

httpd was stopped, started, VM rebooted.

I am getting this message:
image

In preview I have the following error

POSIX methods not available, is php-posix installed and enabled?

#0 /usr/share/icingaweb2/modules/vsphere/library/Vsphere/Api.php(298): Icinga\Module\Vsphere\Api->getCurrentUsername()
#1 /usr/share/icingaweb2/modules/vsphere/library/Vsphere/Api.php(160): Icinga\Module\Vsphere\Api->cacheDir()
#2 /usr/share/icingaweb2/modules/vsphere/library/Vsphere/Api.php(172): Icinga\Module\Vsphere\Api->wsdlDir()
#3 /usr/share/icingaweb2/modules/vsphere/library/Vsphere/Api.php(131): Icinga\Module\Vsphere\Api->prepareWsdl()
#4 /usr/share/icingaweb2/modules/vsphere/library/Vsphere/Api.php(110): Icinga\Module\Vsphere\Api->soapClient()
#5 /usr/share/icingaweb2/modules/vsphere/library/Vsphere/Api.php(233): Icinga\Module\Vsphere\Api->soapCall(String, Object(SoapVar))
#6 /usr/share/icingaweb2/modules/vsphere/library/Vsphere/Api.php(191): Icinga\Module\Vsphere\Api->fetchServiceInstance()
#7 /usr/share/icingaweb2/modules/vsphere/library/Vsphere/Api.php(251): Icinga\Module\Vsphere\Api->getServiceInstance()
#8 /usr/share/icingaweb2/modules/vsphere/library/Vsphere/ProvidedHook/Director/ImportSource.php(28): Icinga\Module\Vsphere\Api->login()
#9 /usr/share/icingaweb2/modules/director/library/Director/Web/Table/ImportsourceHookTable.php(109): Icinga\Module\Vsphere\ProvidedHook\Director\ImportSource->fetchData()
#10 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Web/Table/SimpleQueryBasedTable.php(29): Icinga\Module\Director\Web\Table\ImportsourceHookTable->prepareQuery()
#11 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Web/Table/SimpleQueryBasedTable.php(15): dipl\Web\Table\SimpleQueryBasedTable->getQuery()
#12 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Web/Table/QueryBasedTable.php(56): dipl\Web\Table\SimpleQueryBasedTable->getPaginationAdapter()
#13 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Web/Table/QueryBasedTable.php(237): dipl\Web\Table\QueryBasedTable->getPaginator(Object(dipl\Web\Url))
#14 /usr/share/icingaweb2/modules/director/application/controllers/ImportsourceController.php(145): dipl\Web\Table\QueryBasedTable->renderTo(Object(Icinga\Module\Director\Controllers\ImportsourceController))
#15 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Director\Controllers\ImportsourceController->previewAction()
#16 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#17 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#18 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#19 /usr/share/php/Icinga/Application/webrouter.php(99): Icinga\Application\Web->dispatch()
#20 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#21 {main}

Any suggestions what to check?

Thanks,
Adrian

Hi,

have you installed Icinga Web 2.8+?

PHP 7.1 isn’t used anymore since then, it’s now PHP 7.3. (i.e. rh-php73)
In this case all required php extensions for modules need to be installed for this version.

1 Like

Thanks! I have installed but still not working. But what it’s not clear for me it’s this:

icingacli version
Icinga Web 2 2.8.1
Git Commit 233bd29e4104125b4e5ef631e8c16dde33dadd9a
PHP Version 7.3.11

image

Why do I have different versions?

Thanks,
Adrian

Please follow the upgrading documentation, then the versions should be equal again.

2 Likes

Hello @adrian1

Did the upgrade documentation solve your issue?
Would love to hear back from you :slight_smile:

Feu

Yes. I followed the documentation, rebooted the server and the module worked.

Thanks,
Adrian