[Solved] Server returns 0 from cacti, but ok from cmd line

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
GrandPA
Posts: 7
Joined: Mon Dec 10, 2007 6:08 pm

[Solved] Server returns 0 from cacti, but ok from cmd line

Post by GrandPA »

Hi
I've a problem with return values from a script server script. When cacti runs it the result in the log file is:

Code: Select all

06/29/2010 12:15:03 AM - SPINE: Poller[0] Host[2] DS[25] SS[5] SERVER: /var/www/cacti/scripts/ss_netadmin.php ss_netadmin 192.168.1.2 get addresses 6, output: 0
06/29/2010 12:15:03 AM - SPINE: Poller[0] Host[2] DS[21] SS[4] SERVER: /var/www/cacti/scripts/ss_netadmin.php ss_netadmin 192.168.1.2 get addresses 2, output: 0
06/29/2010 12:15:03 AM - SPINE: Poller[0] Host[2] DS[20] SS[3] SERVER: /var/www/cacti/scripts/ss_netadmin.php ss_netadmin 192.168.1.2 get addresses 1, output: 0
06/29/2010 12:15:03 AM - SPINE: Poller[0] Host[2] DS[24] SS[2] SERVER: /var/www/cacti/scripts/ss_netadmin.php ss_netadmin 192.168.1.2 get addresses 5, output: 0
06/29/2010 12:15:03 AM - SPINE: Poller[0] Host[2] DS[23] SS[1] SERVER: /var/www/cacti/scripts/ss_netadmin.php ss_netadmin 192.168.1.2 get addresses 4, output: 0
06/29/2010 12:15:03 AM - SPINE: Poller[0] Host[2] DS[22] SS[0] SERVER: /var/www/cacti/scripts/ss_netadmin.php ss_netadmin 192.168.1.2 get addresses 3, output: 0 
But if I take teh exact same query and run it from the command line:

Code: Select all

[root@localhost cacti]# php script_server.php 
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /var/www/cacti/lib/adodb/adodb.inc.php on line 866
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /var/www/cacti/lib/adodb/adodb.inc.php on line 872
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /var/www/cacti/lib/adodb/adodb.inc.php on line 1183
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /var/www/cacti/lib/adodb/adodb.inc.php on line 1961
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /var/www/cacti/lib/adodb/adodb.inc.php on line 3027
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /var/www/cacti/lib/adodb/adodb.inc.php on line 3592
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /var/www/cacti/lib/adodb/adodb.inc.php on line 3667
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /var/www/cacti/lib/adodb/adodb.inc.php on line 3687
PHP Deprecated:  Function split() is deprecated in /var/www/cacti/script_server.php on line 43
PHP Script Server has Started - Parent is cmd
/var/www/cacti/scripts/ss_netadmin.php ss_netadmin 192.168.1.2 get addresses 1
35245
/var/www/cacti/scripts/ss_netadmin.php ss_netadmin 192.168.1.2 get addresses 2
441
/var/www/cacti/scripts/ss_netadmin.php ss_netadmin 192.168.1.2 get addresses 3
724
/var/www/cacti/scripts/ss_netadmin.php ss_netadmin 192.168.1.2 get addresses 4
3494
/var/www/cacti/scripts/ss_netadmin.php ss_netadmin 192.168.1.2 get addresses 5
216
/var/www/cacti/scripts/ss_netadmin.php ss_netadmin 192.168.1.2 get addresses 6
101
INDEX and QUERY ends with a print statement and GET with a return statement. Anyone got any ideas what I'm missing here?
Last edited by GrandPA on Tue Jun 29, 2010 5:05 pm, edited 1 time in total.
GrandPA
Posts: 7
Joined: Mon Dec 10, 2007 6:08 pm

Post by GrandPA »

My misstake!

In arg_prepend there was snmp-parameters left from when I tested to use these as holders for parameters to the script query. Unfortunately the poller didn't accept a snmp-query if the host didn't respond to snmp-queries (and this one don't).

All worked well after I removed those variables from arg_prepend.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests