PDA

View Full Version : Zabbix 1.5 - Custom Graphs Problem


Palmertree
24-03-2008, 12:16
Getting the following error when trying to modify an existing graph:


Only variables should be passed by reference[/var/www/html/zabbix/include/graphs.inc.php:458]

Palmertree
24-03-2008, 12:18
Is anyone else having problems selecting Graph items when creating a new Graph? I get a pop up screen that says waiting for host in the browser status bar but the items are never displayed.

NOB
25-03-2008, 08:10
Getting the following error when trying to modify an existing graph:


Only variables should be passed by reference[/var/www/html/zabbix/include/graphs.inc.php:458]

It happened to me, too.

But it doesn't seem to do any (visible) harm using R5512.
The graph is created and the values are shown.

Regards

Norbert.

Alexei
25-03-2008, 09:06
I think it is already fixed in the very latest code. Please report if you still have these errors.

Palmertree
25-03-2008, 14:05
Downloaded the latest trunk and the following error still comes up when saving a custom graph:
Only variables should be passed by reference[/var/www/html/zabbix/include/graphs.inc.php:384]

I will take a look at the code to see if I can find anything. :-)

Aly
25-03-2008, 14:31
Just remove symbols "&" before function names in hosts.inc.php.
I just committed thous changes in svn. Should help :)

Palmertree
25-03-2008, 14:34
Thanks for the quick reply. Trying it now. I will let you know how testing works out. :D

Palmertree
25-03-2008, 14:55
Tried latest trunk. Error still exist.

Aly
25-03-2008, 15:19
It's hard to fix if I don't get such error :( So please provide more info, like revision and line numbers.

Palmertree
25-03-2008, 15:36
Aly, it is still happening on line number 384 in graphs.inc.php. It only happens when I create a new graph and when it click on save. How can I tell what revision number is running?

Only variables should be passed by reference[/var/www/html/zabbix/include/graphs.inc.php:384]

Palmertree
25-03-2008, 15:46
Not sure if this will help but I highlighted the section which is saying there is an error on in the graphs.inc.php file:

if ( $result )
{
info('Graph "'.$name.'" added to hosts '.implode(',',$host_list));

/* add graphs for child hosts */

$host = DBfetch(get_hosts_by_graphid($graphid));

$chd_hosts = get_hosts_by_templateid($host['hostid']);
while($chd_host = DBfetch($chd_hosts))
{
copy_graph_to_host($graphid, $chd_host['hostid'], false);
}
}

Palmertree
25-03-2008, 15:50
Looks like variables by reference changed from PHP versions 4 to 5 according to this article:

http://the-stickman.com/web-development/php/php-505-fatal-error-only-variables-can-be-passed-by-reference/

Aly
25-03-2008, 16:10
I think I found the problem, the fix have been committed to svn. rev 5526

P.S. when you enter "svn update", doesn't it show revision number? :confused:
P.S.S. Yes you are correct about source of this error.

Palmertree
25-03-2008, 16:15
I am using TortoiseSVN. There is probably a gui click that will tell me the revision. I will find out.

Trying latest trunk version now. I will let you know here shortly (10 mins or so) how testing turns out.

Also, thanks again.
:)

Palmertree
25-03-2008, 16:19
Yikes. Revision number is right in front me. :-) Downloading and testing trunk version 5524.

Palmertree
25-03-2008, 16:50
Aly, great work. It is fixed. :D Back to more testing.

Aly
25-03-2008, 17:37
Thanks for providing detailed info :)