netniV / plugin_murlin

A GitHub-fork of the original mURLin plugin found at https://docs.cacti.net/userplugin:murlin
3 stars 2 forks source link

500 Internal Server Error #2

Closed DoubleBeast closed 3 years ago

DoubleBeast commented 5 years ago

Hi guys, maybe is too soon to report problems but here i go. After i finally found your fork and installed it i get a 500 internal error when i try to add an URL.

murlin1

and in the cacti log i get this murlin associated errors:

murlin2

and by the way, thanks for resurrect this plugin.

netniV commented 5 years ago

@thurban was worked on the 1.x version of this and we did commit some code for it. But i'm was sure there were more changes to come, just not sure if they've been committed yet.

If not, I'm sure one of us will pick this up in the near future but it may be the other side of Christmas.

apesjr commented 5 years ago

Bom dia Senhores, Sou um usuário a muito do Cacti desde a versão 8.0.a. A muito venho tentando utilizar o Cacti na versão 1.x, e seus puglins. O unico problema que venho enfrentando, esta com relação ao plugin mURLin. Pois o mesmo não roda na aplicação 100% operacional e sem erros de execução.

LOG ERROR:

2019/06/11 10:26:30 - CMDPHP ERROR: A DB Exec Failed!, Error: Table 'cacti_124a.plugin_mURLin_index' doesn't exist

2019/06/11 10:26:30 - CMDPHP SQL Backtrace: (/plugins.php[86]:api_plugin_uninstall(), /lib/plugins.php[649]:api_plugin_db_changes_remove(), /lib/plugins.php[495]:db_execute(), /lib/database.php[191]:db_execute_prepared()) 2019/06/11 10:26:30 - CMDPHP ERROR: A DB Exec Failed!, Error: Table 'cacti_124a.plugin_mURLin_index' doesn't exist 2019/06/11 10:26:30 - CMDPHP SQL Backtrace: (/plugins.php[86]:api_plugin_uninstall(), /lib/plugins.php[649]:api_plugin_db_changes_remove(), /lib/plugins.php[495]:db_execute(), /lib/database.php[191]:db_execute_prepared()) 2019/06/11 10:26:30 - CMDPHP ERROR: A DB Exec Failed!, Error: Table 'cacti_124a.plugin_mURLin_index' doesn't exist 2019/06/11 10:26:15 - SYSTEM WARNING: Primary Admin account notifications disabled! Unable to send administrative Email. 2019/06/11 10:26:15 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'mURLin' 2019/06/11 10:26:15 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler()) 2019/06/11 10:26:15 - ERROR PHP ERROR in Plugin 'mURLin': Cannot redeclare mURLin_includejavascript() (previously declared in /var/www/html/cacti-1.2.4/plugins/mURLin/url_edit.php:106) in file: /var/www/html/cacti-1.2.4/plugins/mURLin/scripts/functions.php on line: 37 2019/06/11 10:25:03 - SYSTEM MONITOR STATS: Time:0.39 Reboots:0 DownDevices:0 Notifications:0 Purges:0 2019/06/11 10:25:02 - SYSTEM THOLD STATS: Time:0.0220 Tholds:0 TotalDevices:1 DownDevices:0 NewDownDevices:0 2019/06/11 10:25:02 - SYSTEM STATS: Time:1.3023 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:5 RRDsProcessed:5 2019/06/11 10:23:41 - SYSTEM WARNING: Primary Admin account notifications disabled! Unable to send administrative Email. 2019/06/11 10:23:41 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'mURLin' 2019/06/11 10:23:41 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler()) 2019/06/11 10:23:41 - ERROR PHP ERROR in Plugin 'mURLin': Cannot redeclare mURLin_includejavascript() (previously declared in /var/www/html/cacti-1.2.4/plugins/mURLin/url_edit.php:106) in file: /var/www/html/cacti-1.2.4/plugins/mURLin/scripts/functions.php on line: 37 2019/06/11 10:23:28 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins.php[74]:api_plugin_install(), /lib/plugins.php[626]:plugin_mURLin_install(), /plugins/mURLin/setup.php[47]:CactiErrorHandler()) 2019/06/11 10:23:28 - ERROR PHP NOTICE in Plugin 'mURLin': Only variables should be passed by reference in file: /var/www/html/cacti-1.2.4/plugins/mURLin/setup.php on line: 47 2019/06/11 10:23:28 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins.php[74]:api_plugin_install(), /lib/plugins.php[590]:include_once(), /plugins/mURLin/setup.php[39]:plugin_mURLin_upgrade(), /plugins/mURLin/setup.php[64]:plugin_mURLin_check_upgrade(), /plugins/mURLin/setup.php[79]:CactiErrorHandler()) 2019/06/11 10:23:28 - ERROR PHP NOTICE in Plugin 'mURLin': Only variables should be passed by reference in file: /var/www/html/cacti-1.2.4/plugins/mURLin/setup.php on line: 79

netniV commented 5 years ago

Can you open this as a new issue?

jckruger commented 4 years ago

I had the same original issue and all I did was add this line below the other includes: nclude_once('/scripts/functions.php');

Then I commented out the bit that said it had been re-declared:

//function mURLin_includejavascript($filepath) //{ // print ''; //}

Started working when I added a URL and then added the 4 graphs to the device I chose. I’m running cacti 1.2.10 And MuRlIn v1.2

DoubleBeast commented 3 years ago

I had the same original issue and all I did was add this line below the other includes: nclude_once('/scripts/functions.php');

Then I commented out the bit that said it had been re-declared:

//function mURLin_includejavascript($filepath) //{ // print ''; //}

Started working when I added a URL and then added the 4 graphs to the device I chose. I’m running cacti 1.2.10 And MuRlIn v1.2

I edited the file "url_edit.php" as you said above and it now let me add pages and graphs but now i get this error:

`

23/11/2020 11:57:54 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())

23/11/2020 11:57:54 - ERROR PHP ERROR: Uncaught Error: Call to undefined function curl_init() in C:\Apache24\htdocs\cacti\plugins\murlin\scripts\functions.php:550 Stack trace: #0 C:\Apache24\htdocs\cacti\plugins\murlin\scripts\functions.php(247): mURLin_cache_page('1', 'availability') #1 C:\Apache24\htdocs\cacti\plugins\murlin\scripts\query_sites.php(156): mURLin_getAvailability('1') #2 {main} thrown in file: C:\Apache24\htdocs\cacti\plugins\murlin\scripts\functions.php on line: 550

`

and the graphs is blank...

netniV commented 3 years ago

curl_init is a php function supplied by a module. Ensure you have php-curl installed and enabled.

netniV commented 3 years ago

https://www.php.net/manual/en/function.curl-init.php

netniV commented 3 years ago

I'm to close this one as there's been no feedback since.