|
|
| Author |
Message |
mcutting Cacti Pro User
Joined: 16 Oct 2006 Posts: 978
|
Posted: Thu Feb 14, 2008 9:04 am Post subject: PIA 2.0 issues - HELP ! |
|
|
HELP !!!
I managed to get the PIA working on 0.8.7b, but now have
CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1064', SQL:"REPLACE INTO settings (name, value) VALUES ('url_path', 'Cacti\')'
In the logs every 10 seconds - I have set the url_path variable in plugins.php as suggested, and everything seems to work, with the exception of this error.
Any ideas ? |
|
| Back to top |
|
 |
fmangeant Cacti Guru User
Joined: 19 Sep 2003 Posts: 2325 Location: Sophia-Antipolis, France
|
Posted: Thu Feb 14, 2008 9:05 am Post subject: Re: PIA 2.0 issues - HELP ! |
|
|
| mcutting wrote: | | I have set the url_path variable in plugins.php as suggested, and everything seems to work, with the exception of this error. |
How did you modify include/plugins.php ? |
|
| Back to top |
|
 |
mcutting Cacti Pro User
Joined: 16 Oct 2006 Posts: 978
|
Posted: Thu Feb 14, 2008 9:07 am Post subject: |
|
|
Thanks for the prompt reply:
By adding the line
$config['url_path'] = '/cacti/';
Above the following (as suggested in another post)
define('URL_PATH', $config['url_path']); |
|
| Back to top |
|
 |
mcutting Cacti Pro User
Joined: 16 Oct 2006 Posts: 978
|
Posted: Thu Feb 14, 2008 9:55 am Post subject: |
|
|
Anyone have any ideas on this ?
Thanks |
|
| Back to top |
|
 |
mcutting Cacti Pro User
Joined: 16 Oct 2006 Posts: 978
|
Posted: Thu Feb 14, 2008 11:32 am Post subject: |
|
|
Solved this one myself - comment out the following lines in include\plugins.php
| Code: | if (isset($_SERVER['DOCUMENT_ROOT']) && isset($_SERVER['REMOTE_ADDR'])) {
$config['url_path'] = substr(__FILE__, strlen($_SERVER['DOCUMENT_ROOT']), strlen(__FILE__) - strlen($_SERVER['DOCUMENT_ROOT']) - strlen('include/plugins.php'));
db_execute("REPLACE INTO settings (name, value) VALUES ('url_path', '" . $config['url_path'] . "')");
} else {
$config['url_path'] = db_fetch_cell("SELECT value FROM settings WHERE name = 'url_path'");
} |
This seems to have resolved it - not sure if this breaks anything else - everything seems to work as it should.
Hope this may help someone else. |
|
| Back to top |
|
 |
johnrembo Cacti User
Joined: 24 Apr 2006 Posts: 198
|
Posted: Tue Feb 19, 2008 2:37 am Post subject: |
|
|
| mcutting wrote: | Solved this one myself - comment out the following lines in include\plugins.php
| Code: | if (isset($_SERVER['DOCUMENT_ROOT']) && isset($_SERVER['REMOTE_ADDR'])) {
$config['url_path'] = substr(__FILE__, strlen($_SERVER['DOCUMENT_ROOT']), strlen(__FILE__) - strlen($_SERVER['DOCUMENT_ROOT']) - strlen('include/plugins.php'));
db_execute("REPLACE INTO settings (name, value) VALUES ('url_path', '" . $config['url_path'] . "')");
} else {
$config['url_path'] = db_fetch_cell("SELECT value FROM settings WHERE name = 'url_path'");
} |
This seems to have resolved it - not sure if this breaks anything else - everything seems to work as it should.
Hope this may help someone else. |
indeed, $url_path is being reported incorrectly. in my case it cut's away first three symbols instead of |
|
| Back to top |
|
 |
mcutting Cacti Pro User
Joined: 16 Oct 2006 Posts: 978
|
Posted: Tue Feb 19, 2008 2:49 am Post subject: |
|
|
| JohnRembo - this was the same case for me. Commenting these lines has no affect on CACTI, and I can confirm that everything seems to work as it should. |
|
| Back to top |
|
 |
johnrembo Cacti User
Joined: 24 Apr 2006 Posts: 198
|
Posted: Tue Feb 19, 2008 7:04 am Post subject: |
|
|
| mcutting wrote: | | JohnRembo - this was the same case for me. Commenting these lines has no affect on CACTI, and I can confirm that everything seems to work as it should. |
yep, did this...by responding here I just wanted to be included on the list  |
|
| Back to top |
|
 |
sepp
Joined: 21 Jun 2007 Posts: 47 Location: germany
|
Posted: Tue Feb 19, 2008 7:17 am Post subject: |
|
|
hr... any idea on this one?
| Code: | | Fatal error: Call to undefined function api_plugin_hook() in /usr/share/cacti/site/include/global_arrays.php on line 620 |
I applied the sql file... |
|
| Back to top |
|
 |
sepp
Joined: 21 Jun 2007 Posts: 47 Location: germany
|
Posted: Wed Feb 20, 2008 3:09 am Post subject: |
|
|
nobody? no ideas?
thx |
|
| Back to top |
|
 |
srossen
Joined: 13 Jun 2005 Posts: 12
|
Posted: Wed Feb 20, 2008 3:26 pm Post subject: |
|
|
| sepp wrote: | hr... any idea on this one?
| Code: | | Fatal error: Call to undefined function api_plugin_hook() in /usr/share/cacti/site/include/global_arrays.php on line 620 |
I applied the sql file... |
I got that, did not find the missing ")" (if that is even what the problem is) so I just rolled back a version until I have time to look at it. |
|
| Back to top |
|
 |
srossen
Joined: 13 Jun 2005 Posts: 12
|
Posted: Thu Feb 21, 2008 11:44 am Post subject: |
|
|
| sepp wrote: | hr... any idea on this one?
| Code: | | Fatal error: Call to undefined function api_plugin_hook() in /usr/share/cacti/site/include/global_arrays.php on line 620 |
I applied the sql file... |
I got around to looking at this and used the pre-patched files and did not have this issue. I did have to change the path to adodb but now up and running fine on 0.8.7b and PIA 2.0 |
|
| Back to top |
|
 |
sepp
Joined: 21 Jun 2007 Posts: 47 Location: germany
|
Posted: Fri Feb 22, 2008 3:43 am Post subject: |
|
|
| hey, thanks for the help. where did you change the path? |
|
| Back to top |
|
 |
sepp
Joined: 21 Jun 2007 Posts: 47 Location: germany
|
Posted: Mon Feb 25, 2008 8:11 am Post subject: |
|
|
hi, still I have the problem
Fatal error: Call to undefined function api_plugin_hook() in /usr/share/cacti/site/include/global_arrays.php on line 620
I wonder where this function is defined? I commented the call to the function out in each file, cacti was complaining. of course it didn't help. But if I know where the function should be defined....
Am I the only one with this problem? I tried several ways of getting my nice plugins back, but nothing works... drives me crazy
thanks,
//seb |
|
| Back to top |
|
 |
sygo
Joined: 26 Mar 2008 Posts: 1
|
Posted: Wed Mar 26, 2008 12:43 pm Post subject: |
|
|
| sepp wrote: | hi, still I have the problem
Am I the only one with this problem?
//seb |
No, you are not the only one
I have also the same problem and haven't found any issue.
I search and did not find anything else yet.
Have you got a solution for this problem?
I have used the http://cactiusers.org/downloads/cacti-plugin-arch.tar.gz
on Cacti Version 0.8.7b.
My OS is ubuntu gutsy. |
|
| Back to top |
|
 |
|