Cactiusers.org


It is currently Tue Feb 07, 2012 5:47 pm




Post new topic Reply to topic  [ 3 posts ] 
 Wierd php code in cacti Graph Managment link 
Author Message
New User

Joined: Thu Aug 06, 2009 1:30 pm
Posts: 2
Post Wierd php code in cacti Graph Managment link
Hi, i installed Cacti with the plugin Architecture and plugins

All work fine, but i have a weird behavour when a I click some links in the web page in the header of the page I see a php code calling the a hook function

Image

I hope that someone can help me


Attachments:
File comment: Cacti header image
cacti_header.PNG
cacti_header.PNG [ 97.36 KiB | Viewed 489 times ]
Thu Aug 06, 2009 1:39 pm
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post Re: Wierd php code in cacti Graph Managment link
What plugins? 1 of them probably includes a <? at the top instead of <?php

You can either fix / disable the plugin, or fix your php to accept <? tags.


Thu Aug 06, 2009 9:02 pm
New User

Joined: Thu Aug 06, 2009 1:30 pm
Posts: 2
Post Re: Wierd php code in cacti Graph Managment link
Hi Jimmy

I was thinking that was the graph.php file or the data_sources.php because this was the files called when you clic the links
I open the two files, and found that both call's the rdd.php file.

Whe in open it, in the last part of the script I found the next line:

2040 }
2041 }
2042 ?>
2043 $graph_array = api_plugin_hook_function('rrd_graph_graph_options', array('graph_opts' => $graph_opts, 'graph_defs' = > $graph_defs, 'txt_graph_items' => $txt_graph_items, 'graph_id' => $local_graph_id, 'start' => $graph_start, 'end' => $grap h_end));
2044 if (!empty($graph_array)) {
2045 $graph_defs = $graph_array['graph_defs'];
2046 $txt_graph_items = $graph_array['txt_graph_items'];
2047 $graph_opts = $graph_array['graph_opts'];
2048 }

Is the same line that is the header of the page.
Also if you see, is after the ?>, so thats why I see it in the web page.

Now my question is. Is necesary those lines? I tried to modify the file and put ?> after the last line, but I get a php error:

Notice: Undefined variable: graph_opts in /apac/htdocs/cacti/lib/rrd.php on line 2042
Notice: Undefined variable: graph_defs in /apac/htdocs/cacti/lib/rrd.php on line 2042
Notice: Undefined variable: txt_graph_items in /apac/htdocs/cacti/lib/rrd.php on line 2042
Notice: Undefined variable: local_graph_id in /apac/htdocs/cacti/lib/rrd.php on line 2042
Notice: Undefined variable: graph_start in /apac/htdocs/cacti/lib/rrd.php on line 2042
Notice: Undefined variable: graph_end in /apac/htdocs/cacti/lib/rrd.php on line 2042


Fri Aug 07, 2009 11:50 am
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: