z

Commercial Support Clients: Clients with support contracts can get escalated support assistance by visiting Nagios Answer Hub. These forums are for community support services. Although we at Nagios try our best to help out on the forums here, we always give priority support to our support clients.

Some errors on php upgrade

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.

Re: Some errors on php upgrade

Postby gsmith » Fri Mar 25, 2022 1:07 pm

Hi

Please send us the following files:

Code: Select all
/usr/local/nagiosxi/etc/xi-sys.cfg
/etc/php.ini


Also please provide the output of running the following from the CLI on the XI server:
ls -l /etc/php.d/sourceguardian.ini

Thank you
gsmith
 
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Some errors on php upgrade

Postby DonForigua » Mon Apr 11, 2022 9:25 pm

Hi dear Smith

Here is my files

[root@NAGIOSAPP ~]# ls -l /etc/php.d/sourceguardian.ini
-rw-r--r-- 1 root root 23 Feb 4 21:26 /etc/php.d/sourceguardian.ini
You do not have the required permissions to view the files attached to this post.
DonForigua
 
Posts: 94
Joined: Thu Oct 07, 2021 8:59 pm

Re: Some errors on php upgrade

Postby gsmith » Tue Apr 12, 2022 2:44 pm

Hi

Looking at your php.ini I see you missed adding the following (from my 22 March post):
Code: Select all
; added for php 7.4
extension=ixed.7.4.lin


Please add that and double-check what I posted on March 22:
dnf install https://dl.fedoraproject.org/pub/epel/e ... noarch.rpm
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf module list php

Disable the 7.2 module that is enabled:
dnf module reset php:7.2
dnf module list php
dnf module enable php:remi-7.4
dnf install php php-imap php-opcache php-devel php-gd php-ldap php-mbstring php-pdo php-pdo-dblib php-mysqlnd php-pgsql php-pear
sed -i "s:;date.timezone =.*:date.timezone = ${PHPTZ}:" /etc/php.ini
cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nag ... est.tar.gz
tar zxf xi-latest.tar.gz
cd /tmp/nagiosxi
rm -rf /etc/php.d/sourceguardian.ini
./init.sh
sed -i '/^PHP script/d' xi-sys.cfg
sed -i '/^1)/d' xi-sys.cfg
sed -i '/^2)/d' xi-sys.cfg
sed -i '/^3)/d' xi-sys.cfg
./install-sourceguardian-extension.sh


Edit /etc/php.ini and add 'extension=ixed.7.4.lin' directive
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename
;
; For example:
;
; extension=mysqli
;
; When the extension library to load is not located in the default extension
; directory, You may specify an absolute path to the library file:
;
; extension=/path/to/extension/mysqli.so
;
; Note : The syntax used in previous PHP versions ('extension=<ext>.so' and
; 'extension='php_<ext>.dll') is supported for legacy reasons and may be
; deprecated in a future PHP major version. So, when it is possible, please
; move to the new ('extension=<ext>) syntax.

;;;;
; Note: packaged extension modules are now loaded via the .ini files
; found in the directory /etc/php.d; these are loaded by default.
;;;;
; added for php 7.4
extension=ixed.7.4.lin


Restart the server
shutdown -r now


I didn't check the xi-sys.cfg file, but once you follow the above instructions let me know how things go.

Thanks
gsmith
 
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Some errors on php upgrade

Postby DonForigua » Wed Apr 13, 2022 11:11 am

Hi dear Smith

But i see that this extension is here

Code: Select all
[root@NAGIOSAPP ~]#  cat /etc/php.d/sourceguardian.ini
extension=ixed.7.4.lin
[root@NAGIOSAPP ~]# ls -al /etc/php.d | grep source
-rw-r--r--    1 root root    23 Feb  4 21:26 sourceguardian.ini


must also i add to /etc/php.ini ?

Thanks for your help
DonForigua
 
Posts: 94
Joined: Thu Oct 07, 2021 8:59 pm

Re: Some errors on php upgrade

Postby gsmith » Wed Apr 13, 2022 11:58 am

Hi

Yes.

Please perform the following in a command line on the server:
Code: Select all
script /tmp/nagios_support.log
dnf module reset php:7.2
dnf module list php
dnf module enable php:remi-7.4
dnf install php php-imap php-opcache php-devel php-gd php-ldap php-mbstring php-pdo php-pdo-dblib php-mysqlnd php-pgsql php-pear
sed -i "s:;date.timezone =.*:date.timezone = ${PHPTZ}:" /etc/php.ini
cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nag ... est.tar.gz
tar zxf xi-latest.tar.gz
cd /tmp/nagiosxi
rm -rf /etc/php.d/sourceguardian.ini
./init.sh
sed -i '/^PHP script/d' xi-sys.cfg
sed -i '/^1)/d' xi-sys.cfg
sed -i '/^2)/d' xi-sys.cfg
sed -i '/^3)/d' xi-sys.cfg
./install-sourceguardian-extension.sh
exit


Send me the following files:
/tmp/nagios_support.log
/usr/local/nagiosxi/etc/xi-sys.cfg
/etc/php.ini

Thanks
gsmith
 
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Some errors on php upgrade

Postby DonForigua » Wed Apr 13, 2022 6:22 pm

Hi dear Smith

why should i reinstall php if i alrready have it

Code: Select all
Remi's Modular repository for Enterprise Linux 8 - x86_64
Name         Stream               Profiles                          Summary
php          remi-7.2             common [d], devel, minimal        PHP scripting language
php          remi-7.3             common [d], devel, minimal        PHP scripting language
php          remi-7.4 [e]         common [d], devel, minimal        PHP scripting language
php          remi-8.0             common [d], devel, minimal        PHP scripting language
php          remi-8.1             common [d], devel, minimal        PHP scripting language

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[root@NAGIOSAPP ~]# php -v
PHP 7.4.28 (cli) (built: Feb 15 2022 13:23:10) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies


and the timezone is correct

Code: Select all
[root@NAGIOSAPP ~]# cat /etc/php.ini | grep date.timezone
; http://php.net/date.timezone
date.timezone = America/Bogota


and all packages are installed

Code: Select all
[root@NAGIOSAPP ~]# rpm -qa | egrep '^php' | sort
php-7.4.28-1.el8.remi.x86_64
php-cli-7.4.28-1.el8.remi.x86_64
php-common-7.4.28-1.el8.remi.x86_64
php-devel-7.4.28-1.el8.remi.x86_64
php-fedora-autoloader-1.0.1-2.el8.remi.noarch
php-fpm-7.4.28-1.el8.remi.x86_64
php-gd-7.4.28-1.el8.remi.x86_64
php-imap-7.4.28-1.el8.remi.x86_64
php-json-7.4.28-1.el8.remi.x86_64
php-ldap-7.4.28-1.el8.remi.x86_64
php-mbstring-7.4.28-1.el8.remi.x86_64
php-mysqlnd-7.4.28-1.el8.remi.x86_64
php-odbc-7.4.28-1.el8.remi.x86_64
php-opcache-7.4.28-1.el8.remi.x86_64
php-pdo-7.4.28-1.el8.remi.x86_64
php-pdo-dblib-7.4.28-1.el8.remi.x86_64
php-pear-1.10.13-1.el8.remi.noarch
php-pecl-mysql-1.0.0-0.23.20190415.d7643af.el8.remi.7.4.x86_64
php-pecl-ssh2-1.3.1-1.el8.remi.7.4.x86_64
php-pgsql-7.4.28-1.el8.remi.x86_64
php-process-7.4.28-1.el8.remi.x86_64
php-snmp-7.4.28-1.el8.remi.x86_64
php-sodium-7.4.28-1.el8.remi.x86_64
php-xml-7.4.28-1.el8.remi.x86_64


:shock: :shock:
DonForigua
 
Posts: 94
Joined: Thu Oct 07, 2021 8:59 pm

Re: Some errors on php upgrade

Postby gsmith » Thu Apr 14, 2022 9:11 am

Did you run:
dnf module reset php:7.2

Did you re-install sourceguardian?
cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nag ... est.tar.gz
tar zxf xi-latest.tar.gz
cd /tmp/nagiosxi
rm -rf /etc/php.d/sourceguardian.ini
./init.sh
sed -i '/^PHP script/d' xi-sys.cfg
sed -i '/^1)/d' xi-sys.cfg
sed -i '/^2)/d' xi-sys.cfg
sed -i '/^3)/d' xi-sys.cfg
./install-sourceguardian-extension.sh


Thanks
gsmith
 
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Some errors on php upgrade

Postby DonForigua » Tue Apr 19, 2022 9:52 am

Hello

Yes, i followed this instructions

https://support.nagios.com/kb/article/n ... 7-860.html
DonForigua
 
Posts: 94
Joined: Thu Oct 07, 2021 8:59 pm

Re: Some errors on php upgrade

Postby gsmith » Tue Apr 19, 2022 12:08 pm

Hi

Please take a look at the attached screen capture. Then perform the
same actions on your system - and capture any errors that occur.

Thank you
You do not have the required permissions to view the files attached to this post.
gsmith
 
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Some errors on php upgrade

Postby DonForigua » Thu Apr 21, 2022 10:21 pm

Hello i've tried to replicate and i get the same error
You do not have the required permissions to view the files attached to this post.
DonForigua
 
Posts: 94
Joined: Thu Oct 07, 2021 8:59 pm

PreviousNext

Return to Nagios XI

Who is online

Users browsing this forum: mister_monitor and 9 guests