Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support
It is currently Mon May 21, 2012 8:55 am


ATTENTION: All users passwords have been cleared.
Please use the "Forgot Password" feature to reset your password.


All times are UTC - 5 hours




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: 0.8.7d + PIA 2.4 "upgrade" process patch errors
PostPosted: Fri Feb 13, 2009 10:22 am 
Offline
Cacti User

Joined: Tue Nov 18, 2008 6:57 am
Posts: 58
Not sure this in the right spot, but someone posted about this in the announce forum and I think this is the answer:

when applying PIA 2.4, the following patch errors occur:

from /include/global_constants.php.rej:
Code:
***************
*** 175,178 ****
  define("SNMP_CMDPHP", 1);
  define("SNMP_WEBUI", 2);

  ?>--- 175,182 ----
  define("SNMP_CMDPHP", 1);
  define("SNMP_WEBUI", 2);

+ define('OPER_MODE_NATIVE', 0);
+ define('OPER_MODE_RESKIN', 1);
+ define('OPER_MODE_IFRAME_NONAV', 2);
+
  ?>


I think this "failure" results in the following (from the other post):

Quote:
Some php warnings:

at console header:

Notice: Use of undefined constant OPER_MODE_NATIVE - assumed 'OPER_MODE_NATIVE' in /cacti-0.8.7d/include/top_header.php on line 27
Notice: Use of undefined constant OPER_MODE_RESKIN - assumed 'OPER_MODE_RESKIN' in /cacti-0.8.7d/include/top_header.php on line 28
Notice: Use of undefined constant OPER_MODE_NATIVE - assumed 'OPER_MODE_NATIVE' in /cacti-0.8.7d/include/top_header.php on line 48
Notice: Use of undefined constant OPER_MODE_NATIVE - assumed 'OPER_MODE_NATIVE' in /cacti-0.8.7d/include/top_header.php on line 55


at console home page:

Notice: Use of undefined constant OPER_MODE_NATIVE - assumed 'OPER_MODE_NATIVE' in /cacti-0.8.7d/include/bottom_footer.php on line 25
Notice: Use of undefined constant OPER_MODE_NATIVE - assumed 'OPER_MODE_NATIVE' in /cacti-0.8.7d/include/bottom_footer.php on line 26


I haven't spent much time investigating these, although I know the line numbers are "off" by 1 in the patch process (our file has these on 174, not 175), but we manually added these lines to the end of this file and things appear fine to us:

Code:
define('OPER_MODE_NATIVE', 0);
define('OPER_MODE_RESKIN', 1);
define('OPER_MODE_IFRAME_NONAV', 2);


also of note, our global_constants.php is a stock file and un-editted to this point (so there shouldn't be any custom stuff in this file on our systems).

Hope this helps someone,

Sasifras


Top
 Profile  
 
 Post subject: Thanks!
PostPosted: Fri Feb 13, 2009 3:12 pm 
Offline

Joined: Thu Jan 10, 2008 12:46 pm
Posts: 8
I'm glad someone posted on this!! I have that exact issue, and not being too savy at debugging I reverted back. I'll give this a try. Thanks much for posting!

Anyone else feel it's a bit of a pain to upgrade Cacti? All the documentation I'm finding seems to speak to a base Cacti upgrade without Spine or plugins. As far as I can tell, it seems I need to follow the documented way to upgrade Cacti, install the PIA, install latest plugins, and install spine. That's all theoretical since I haven't been successful yet. :cry:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 13, 2009 3:39 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 20544
Location: Muenster, Germany
That sequence is indeed correct by now.
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 16, 2009 10:32 am 
Offline

Joined: Tue Jan 27, 2009 6:10 am
Posts: 7
Location: France
I have the same problem on Cacti 0.8.7c without Spine. (default poller)

If not --dry-run, cacti is corrupted.

Hunk failed at 175.

Have you a solution ?

Regards.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 16, 2009 10:53 am 
Offline
Cacti User

Joined: Tue Nov 18, 2008 6:57 am
Posts: 58
Go into the .diff file for the PIA and find the line with "175" on it, change it to "174" and re-run. See if that dry-run's ok.


Top
 Profile  
 
 Post subject: patch error
PostPosted: Mon Feb 16, 2009 11:39 am 
Offline

Joined: Tue Mar 01, 2005 1:49 pm
Posts: 26
You can also get the 2.4 patch to run by using '-F 3' when running the patch command. That allows more fuzz and the global constants file gets patched.

The PIA patch only works on the cacti .tar.gz file. On the cacti .zip file it fails on all patches. I think there is a line ending issue.


Top
 Profile  
 
 Post subject: got this error too
PostPosted: Tue Feb 17, 2009 2:36 am 
Offline

Joined: Mon Feb 16, 2009 7:42 am
Posts: 4
I'm new in cacti. Fresh installation.
While patching proces ( patch -p1 -F3 -N --dry-run < cacti-plugin-0.8.7d-PA-v2.4.diff) I get
patching file include/global_constants.php
Hunk #1 succeeded at 175 with fuzz 3.

My include/global_constants.php from line 174 looks like:
define("SNMP_POLLER", 0);
define("SNMP_CMDPHP", 1);
define("SNMP_WEBUI", 2);

define('OPER_MODE_NATIVE', 0);
define('OPER_MODE_RESKIN', 1);
define('OPER_MODE_IFRAME_NONAV', 2);

?>

And now my cacti not work corretly. Broken links and no images. Any idea ?

Software version:
cacti-0.8.7d.tar.gz
cacti-plugin-0.8.7d-PA-v2.4.zip


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 17, 2009 7:19 am 
Offline
Cacti User

Joined: Tue Nov 18, 2008 6:57 am
Posts: 58
Quote:
And now my cacti not work corretly. Broken links and no images. Any idea ?


I'd double-check your file permissions on all files/directories.[/quote]


Top
 Profile  
 
 Post subject: Problem solved
PostPosted: Tue Feb 17, 2009 3:00 pm 
Offline

Joined: Mon Feb 16, 2009 7:42 am
Posts: 4
Problem was with pictures and links path. Cacti was installed in web server subdirectory (in my environment http://deb/cacti2) and without plugin arch. worked correctly. For example images was at http://deb/cacti2/image.png. But after the patch was applied image path changed to http://deb/image.png. Afted made subdomain all works fine. I'm new in cacti but I think it's not normal behaviour.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 17, 2009 3:39 pm 
Offline
Cacti User

Joined: Tue Nov 18, 2008 6:57 am
Posts: 58
Ahh.. I think somewhere in the instructions for PIA there is a note that if your cacti installation is not in the root of the webserver you need to go modify the include/global.php file. Look for url_path line:

Code:
/*
   Edit this to point to the default URL of your Cacti install
   ex: if your cacti install as at http://serverip/cacti/ this
   would be set to /cacti/
*/

$config['url_path'] = '/';


in your case, I think your url_path should be:
Code:
$config['url_path'] = '/cacti2/';


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 17, 2009 4:33 pm 
Offline

Joined: Mon Feb 16, 2009 7:42 am
Posts: 4
Yes, this is the solution. Thanks for your help.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 18, 2009 10:20 am 
Offline
Cacti User

Joined: Tue Jan 27, 2009 5:41 am
Posts: 64
when I update cacti to 0.8.7d, The patch PA 2.4 file doesn't work .

I have many errors....

?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 18, 2009 11:15 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
ambre wrote:
when I update cacti to 0.8.7d, The patch PA 2.4 file doesn't work .

I have many errors....

?


This comment helps like "0".

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 19, 2009 3:11 am 
Offline
Cacti User

Joined: Tue Jan 27, 2009 5:41 am
Posts: 64
TheWitness wrote:
ambre wrote:
when I update cacti to 0.8.7d, The patch PA 2.4 file doesn't work .

I have many errors....

?


This comment helps like "0".

TheWitness


The patch return:

patch -p1 -N --dry-run < cacti-plugin-0.8.7d-PA-v2.4.diff
patching file auth_changepassword.php
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file auth_changepassword.php.rej
patching file auth_login.php
Reversed (or previously applied) patch detected! Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file auth_login.php.rej
patching file data_sources.php
Hunk #1 FAILED at 44.
Hunk #2 FAILED at 404.
Hunk #3 FAILED at 538.
Hunk #4 FAILED at 685.
Hunk #5 FAILED at 979.
Hunk #6 FAILED at 1313.
Hunk #7 FAILED at 1342.
7 out of 7 hunks FAILED -- saving rejects to file data_sources.php.rej
patching file graph_image.php
Hunk #1 FAILED at 44.
1 out of 1 hunk FAILED -- saving rejects to file graph_image.php.rej
patching file graph.php
Hunk #1 FAILED at 98.
Hunk #2 FAILED at 213.
Hunk #3 FAILED at 246.
3 out of 3 hunks FAILED -- saving rejects to file graph.php.rej
patching file graphs_new.php
Hunk #1 FAILED at 479.
1 out of 1 hunk FAILED -- saving rejects to file graphs_new.php.rej
patching file graphs.php
Hunk #1 FAILED at 45.
Hunk #2 FAILED at 362.
Hunk #3 FAILED at 506.
3 out of 3 hunks FAILED -- saving rejects to file graphs.php.rej
patching file host.php
Hunk #1 FAILED at 44.
Hunk #2 FAILED at 311.
Hunk #3 FAILED at 449.
Hunk #4 FAILED at 542.
Hunk #5 FAILED at 654.
Hunk #6 FAILED at 1116.
6 out of 6 hunks FAILED -- saving rejects to file host.php.rej
patching file include/auth.php
Hunk #1 FAILED at 31.
Hunk #2 FAILED at 78.
Hunk #3 FAILED at 86.
Hunk #4 FAILED at 94.
4 out of 4 hunks FAILED -- saving rejects to file include/auth.php.rej
patching file include/bottom_footer.php
Hunk #1 FAILED at 21.
Hunk #2 FAILED at 35.
2 out of 2 hunks FAILED -- saving rejects to file include/bottom_footer.php.rej
patching file include/global_arrays.php
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 642.
2 out of 2 hunks FAILED -- saving rejects to file include/global_arrays.php.rej
patching file include/global_constants.php
Hunk #1 FAILED at 175.
1 out of 1 hunk FAILED -- saving rejects to file include/global_constants.php.rej
patching file include/global_form.php
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 1185.
2 out of 2 hunks FAILED -- saving rejects to file include/global_form.php.rej
patching file include/global.php
Hunk #1 FAILED at 41.
Hunk #2 FAILED at 91.
Hunk #3 FAILED at 194.
Hunk #4 FAILED at 219.
4 out of 4 hunks FAILED -- saving rejects to file include/global.php.rej
patching file include/global_settings.php
Hunk #1 FAILED at 1185.
1 out of 1 hunk FAILED -- saving rejects to file include/global_settings.php.rej
The next patch would create the file include/plugins.php,
which already exists! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file include/plugins.php.rej
patching file include/top_graph_header.php
Hunk #1 FAILED at 25.
Hunk #2 FAILED at 51.
Hunk #3 FAILED at 107.
Hunk #4 FAILED at 119.
Hunk #5 FAILED at 127.
Hunk #6 FAILED at 156.
6 out of 6 hunks FAILED -- saving rejects to file include/top_graph_header.php.rej
patching file include/top_header.php
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 79.
Hunk #3 FAILED at 87.
Hunk #4 FAILED at 100.
4 out of 4 hunks FAILED -- saving rejects to file include/top_header.php.rej
patching file index.php
Hunk #1 FAILED at 25.
Hunk #2 FAILED at 48.
2 out of 2 hunks FAILED -- saving rejects to file index.php.rej
patching file lib/api_device.php
Hunk #1 FAILED at 132.
1 out of 1 hunk FAILED -- saving rejects to file lib/api_device.php.rej
patching file lib/auth.php
Hunk #1 FAILED at 122.
Hunk #2 FAILED at 155.
2 out of 2 hunks FAILED -- saving rejects to file lib/auth.php.rej
patching file lib/functions.php
Hunk #1 FAILED at 1640.
Hunk #2 FAILED at 1653.
Hunk #3 FAILED at 1732.
3 out of 3 hunks FAILED -- saving rejects to file lib/functions.php.rej
patching file lib/html_form.php
Hunk #1 FAILED at 661.
Hunk #2 FAILED at 678.
Hunk #3 FAILED at 699.
3 out of 3 hunks FAILED -- saving rejects to file lib/html_form.php.rej
patching file lib/html.php
Hunk #1 FAILED at 86.
Hunk #2 FAILED at 143.
Hunk #3 FAILED at 177.
Hunk #4 FAILED at 263.
Hunk #5 FAILED at 702.
Hunk #6 FAILED at 713.
Hunk #7 FAILED at 742.
Hunk #8 FAILED at 763.
8 out of 8 hunks FAILED -- saving rejects to file lib/html.php.rej
The next patch would create the file lib/plugins.php,
which already exists! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file lib/plugins.php.rej
patching file lib/poller.php
Hunk #1 FAILED at 324.
1 out of 1 hunk FAILED -- saving rejects to file lib/poller.php.rej
patching file lib/rrd.php
Hunk #1 FAILED at 557.
Hunk #2 FAILED at 1392.
Hunk #3 FAILED at 1407.
3 out of 3 hunks FAILED -- saving rejects to file lib/rrd.php.rej
patching file lib/variables.php
Hunk #1 FAILED at 183.
1 out of 1 hunk FAILED -- saving rejects to file lib/variables.php.rej
The next patch would create the file plugins/index.php,
which already exists! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file plugins/index.php.rej
The next patch would create the file plugins.php,
which already exists! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file plugins.php.rej
patching file poller.php
Hunk #1 FAILED at 73.
Hunk #2 FAILED at 263.
Hunk #3 FAILED at 407.
Hunk #4 FAILED at 458.
4 out of 4 hunks FAILED -- saving rejects to file poller.php.rej
patching file user_admin.php
Hunk #1 FAILED at 72.
Hunk #2 FAILED at 420.
Hunk #3 FAILED at 463.
Hunk #4 FAILED at 915.
Hunk #5 FAILED at 943.
Hunk #6 FAILED at 957.
6 out of 6 hunks FAILED -- saving rejects to file user_admin.php.rej
patching file utilities.php
Hunk #1 FAILED at 129.
Hunk #2 FAILED at 1645.
2 out of 2 hunks FAILED -- saving rejects to file utilities.php.rej


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 19, 2009 3:25 am 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 10423
Location: WA, USA
Is the PA 2.4 current with the latest patches? If not, its pre-patched files should be updated so they are for those who can't use a patching utility.

_________________

| Scripts: Monitor processes | MBM5 | HDD Health | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware |
| Guides: My Windows Install Guide | [HOWTO] NTFS permissions |
| Tools: Windows Installer |


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


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:
Jump to:  
cron

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group