SOLVED! No New data after upgrade from 0.8.6j to 0.8.7e

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
louiscafe
Posts: 4
Joined: Tue Aug 04, 2009 11:01 pm

SOLVED! No New data after upgrade from 0.8.6j to 0.8.7e

Post by louiscafe »

Hi,

I've upgrade my CACTI from 0.8.6j to 0.8.7e yesterday, the exisiting graph and the data was show normally, after check today, there are no new data was shown, could any professional guys help to solve this problem?

Debug Message:
RRDTool Command:

c:/RRDtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="XXXX_Router_2600_02_MetroIP - Traffic - Fa0/0 " \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:8: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="C\:/Inetpub/wwwroot/cacti/rra/XXXX_2600_core_router_02_traffic_in_291.rrd":traffic_in:AVERAGE \
DEF:b="C\:/Inetpub/wwwroot/cacti/rra/XXXX_2600_core_router_02_traffic_in_291.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=b,8,* \
AREA:cdefa#00CF00FF:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf%s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf%s" \
COMMENT:"Total In\: 1.01 GB\n" \
LINE1:cdeff#002A97FF:"Outbound" \
GPRINT:cdeff:LAST:"Current\:%8.2lf%s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf%s" \
COMMENT:"Total Out\: 6.37 MB"

RRDTool Says:
OK
Last edited by louiscafe on Wed Aug 05, 2009 6:15 am, edited 1 time in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Is your rra/ directory and the files inside it still owned by the cacti user?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
louiscafe
Posts: 4
Joined: Tue Aug 04, 2009 11:01 pm

Post by louiscafe »

Problem Solved!!!

It is caused by the BUG of PHP and also the config of cmd.php.

Add $guess = strtolower($guess); into the following location:
Code:

/* PHP Bug. Not yet submitted */
if ($config["cacti_server_os"] == "win32") {
$guess = substr(__FILE__,0,2);
$guess = strtolower($guess);
if ($guess == strtoupper($guess)) {
$response = "ERROR: The PHP Script: CMD.PHP Must be started using the full path to the file and in lower case. This is a PHP Bug!!!";
print "\n";
cacti_log($response,true);
exit(-1);
}
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

What php version?
That cmd.php looks old... somewhat different in cacti 0.8.7e.
louiscafe
Posts: 4
Joined: Tue Aug 04, 2009 11:01 pm

Post by louiscafe »

PHP 5.2.0
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Sure you correctly upgraded? The source code clearly states it was fixed in php 5.2.0. There was a logic bug back in 0.8.6j and php 5.2.0, but thats been long fixed.

Current cmd.php:

Code: Select all

/* correct for a windows PHP bug. fixed in 5.2.0 */
if ($config["cacti_server_os"] == "win32") {
	/* check PHP versions first, we know 5.2.0 and above is fixed */
	if (version_compare("5.2.0", PHP_VERSION, ">=")) {
		$guess = substr(__FILE__,0,2);
		if ($guess == strtoupper($guess)) {
			$response = "ERROR: The PHP Script: CMD.PHP Must be started using the full path to the file and in lower case.  This is a PHP Bug!!!";
			print "\n";
			cacti_log($response,true);

			record_cmdphp_done();
			exit("-1");
		}
	}
}
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest