Page 1 of 1

PHP Deprecated: Function eregi() is deprecated

Posted: Wed Dec 18, 2013 1:49 am
by zaji_nms
[Wed Dec 18 08:43:49 2013] [error] [client x.x.x.x] PHP Deprecated: Function eregi() is deprecated in /usr/local/nagios/share/pnp/include/function.inc.php on line 1553, referer: http://x.x.x.x/nagios/pnp/index.php/gra ... tEthernet2

i have added a new function interfacetable_v3t in nagios as i want to monitor bult subinterface bandwidth and performance thorough this plugin but i am getting above error how do i fix it ?

Re: PHP Deprecated: Function eregi() is deprecated

Posted: Wed Dec 18, 2013 9:50 am
by tmcdonald
Please do not post questions in unrelated threads. I have split your post from the thread and started a new one.

Re: PHP Deprecated: Function eregi() is deprecated

Posted: Thu Dec 19, 2013 12:52 am
by zaji_nms
really i was not knowing that , my intense was not bad. i wanted that issue to be fix. next time i will take care.

Re: PHP Deprecated: Function eregi() is deprecated

Posted: Thu Dec 19, 2013 10:36 am
by abrist
What version of XI are you running?
How about php?

Code: Select all

yum list installed | grep php

Re: PHP Deprecated: Function eregi() is deprecated

Posted: Sun Dec 22, 2013 5:28 am
by zaji_nms
NagiosXI version : 2012R1.8
[root@localhost ~]# yum list installed | grep php
php.x86_64 5.3.3-14.el6_3 @updates
php-cli.x86_64 5.3.3-14.el6_3 @updates
php-common.x86_64 5.3.3-14.el6_3 @updates
php-gd.x86_64 5.3.3-14.el6_3 @updates
php-mbstring.x86_64 5.3.3-14.el6_3 @updates
php-mcrypt.x86_64 5.3.3-1.el6 @epel
php-mssql.x86_64 5.3.3-1.el6 @epel
php-mysql.x86_64 5.3.3-14.el6_3 @updates
php-pdo.x86_64 5.3.3-14.el6_3 @updates
php-pear.noarch 1:1.9.4-4.el6 @base
php-pear-HTML-Template-IT.noarch
1.3.0-2.el5 @/php-pear-HTML-Template-IT-1.3.0-2.el5.noarch
php-pgsql.x86_64 5.3.3-14.el6_3 @updates
php-snmp.x86_64 5.3.3-14.el6_3 @updates
php-xml.x86_64 5.3.3-14.el6_3 @updates

Re: PHP Deprecated: Function eregi() is deprecated

Posted: Mon Dec 23, 2013 10:22 am
by scottwilkerson
We have never recommending using the pnp links directly as you have shown for Nagios XI, you should use the following to get the image for the graphs

Code: Select all

http://x.x.x.x/nagiosxi/includes/components/perfdata/graphApi.php?host=xx-xx-2&service=If_GigabitEthernet2
This does some error handling on old code in PNP