Cacti 0.8.5 + Cactistoric-0.8.5-0.03

Addons for Cacti and discussion about those addons

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
monideth
Cacti User
Posts: 95
Joined: Thu Apr 03, 2003 3:29 am
Contact:

Cacti 0.8.5 + Cactistoric-0.8.5-0.03

#1 Post by monideth » Thu Feb 19, 2004 9:53 pm

Hi,

I've just installed Cactistoric-0.8.5-0.03 - however, I am getting the following PHP error when I try to click on the zoom button of a graph:

Parse error: parse error, unexpected $ in /var/www/cacti/cactistoric.php on line 265

Since cactistoric.php only has 264 lines then I am puzzled. Searching internet seem to suggest a problem with matching of brackets/braces.

I have checked that all cactistoric files has same user:group as cacti (cactiuser:cactiuser).

I have updated a test RRA file to test using the script provided (does cactistoric need RRA files row values to be changed in order work?)

Please can somebody advise on what I need to do to get this working!

Regards,

Mon

User avatar
monideth
Cacti User
Posts: 95
Joined: Thu Apr 03, 2003 3:29 am
Contact:

#2 Post by monideth » Wed Feb 25, 2004 4:31 am

Hi,

Since I have had no repsonse/help on this subject I have had to troubleshoot it myself!

Here are my current conclusions...

The parse error seems to indicate a missing bracket/braces problem. However, I have tried to go through the PHP script code but could not see any errors.

PHP allows you to create a HTML output which includes syntax highlighting (php -s cactistoric.php).

When viewing this output file on my RH8 Cacti machine shows there is some kind of syntax error in the following lines (does not highlight correct in output):

Code: Select all

for ($i=$start_year-2 ; $i<=$end_year+2 ; $i++) 
        { 
                ?><option value="<?print $i;?>"<?if ($i==$start_year) {?> selected<?}?>><?printf("%04d", $i);?></option> 
<?      }


However when viewing the output produced on a Fedora Core 1 machine does not show any issues with syntax!

I checked the version of PHP on these machines:

RH8 - php-4.2.2-8.0.8
FC1 - php-4.3.4-1.1

I can only conlude that the php version on my RH8 Cacti machine has an issue with this code.

I cannot find any PHP RH8 RPMs for a higher version - and I dont really want to compile from source. Thus, I am at present trying to upgrade my RH8 to FC1.

Can anybody confirm/deny this issue? Is anybody using PHP 4.2.2 and Cactistoric 0.8.5-03 without any problems?

I will keep you all posted.

Regards,

Mon

User avatar
monideth
Cacti User
Posts: 95
Joined: Thu Apr 03, 2003 3:29 am
Contact:

#3 Post by monideth » Thu Feb 26, 2004 5:52 am

Well, after a lot of trouble upgrading to Fedora Core 1 I can report that my Cactistoric now works!

Since I did have to remove/re-install packages during the upgrade process I cannot be 100% that the reason by Cactistoric previously didn;t work was because it was using php-4.2.2-8.0.8.

However, now I am using php-4.3.4-1.1 and it seems to work without the errors I was experiencing prevsiously.

Regards,

Mon

Post Reply