PHP error Weathermap version 0.97c

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
zloyrok
Posts: 4
Joined: Tue Oct 07, 2014 5:41 am

PHP error Weathermap version 0.97c

Post by zloyrok »

Ubuntu 14.04
Cacti 0.8.8b
php5
PHP Weathermap version 0.97c

When I click on:
Create A New Map: Named:1234 Create
I open the editor, input some name for the map and click create.
But I dont get a feedback or a map. It does nothing.

/var/log/apache2/error.log
[Tue Oct 07 09:21:43.565320 2014] [:error] [pid 5189] [client XX.XX.XXX.XXX:55411] PHP Deprecated: Function split() is deprecated in /usr/share/cacti/site/plugins/weathermap/editor.php on line 33, referer: http://XX.XX.XX.XX/cacti/plugins/weathermap/editor.php

Line 33:
/usr/share/cacti/site/plugins/weathermap/editor.php
$parts = split(":",$_COOKIE['wmeditor']);


Permissions:
/usr/share/cacti/site/plugins/weathermap/
drwxrwxr-x 2 www-data www-data 4096 Oct 7 12:28 configs
drwxrwxr-x 2 www-data www-data 4096 Oct 7 12:10 output
/var/lib/cacti/
drwxrwxr-x 2 www-data www-data 4096 Oct 2 12:20 rra


Help me, please.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: PHP error Weathermap version 0.97c

Post by phalek »

replace

Code: Select all

$parts = split(":",$_COOKIE['wmeditor']);
with

Code: Select all

$parts = explode(":",$_COOKIE['wmeditor']);
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
zloyrok
Posts: 4
Joined: Tue Oct 07, 2014 5:41 am

Re: PHP error Weathermap version 0.97c

Post by zloyrok »

Thanks. But editor doesn't work.
Last edited by zloyrok on Tue Oct 07, 2014 8:13 am, edited 1 time in total.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: PHP error Weathermap version 0.97c

Post by phalek »

i suggest adding php error logging. Look for the "error_log = syslog" line in your php.ini and check your syslog after running the editor.php again.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
zloyrok
Posts: 4
Joined: Tue Oct 07, 2014 5:41 am

Re: PHP error Weathermap version 0.97c

Post by zloyrok »

/var/log/syslog
Oct 7 17:35:01 server CRON[2165]: (www-data) CMD (php --define suhosin.memory_limit=512M /usr/share/cacti/site/poller.php 2>&1 >/dev/null | if [ -f /usr/bin/ts ] ; then ts ; else tee ; fi >> /var/log/cacti/poller-error.log)

/var/log/cacti/poller-error.log
PHP Deprecated: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. in /usr/share/cacti/site/plugins/weathermap/lib/poller-common.php on line 91
PHP Deprecated: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. in /usr/share/cacti/site/plugins/weathermap/lib/poller-common.php on line 268
PHP Deprecated: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. in /usr/share/cacti/site/plugins/weathermap/lib/poller-common.php on line 269

I changed "mysql_escape_string" to "mysql_real_escape_string" in poller-common.php

There arent log in /var/log/cacti/poller-error.log

But editor doenst work.
/var/log/syslog
Oct 7 18:15:01 server CRON[1794]: (www-data) CMD (php --define suhosin.memory_limit=512M /usr/share/cacti/site/poller.php 2>&1 >/dev/null | if [ -f /usr/bin/ts ] ; then ts ; else tee ; fi >> /var/log/cacti/poller-error.log)
zloyrok
Posts: 4
Joined: Tue Oct 07, 2014 5:41 am

Re: PHP error Weathermap version 0.97c

Post by zloyrok »

What log file can I examine?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: PHP error Weathermap version 0.97c

Post by Howie »

The name must end in .conf and contain no spaces... this was added in a hurry to patch a couple of security issues, so it doesn't really warn you if you don't comply.
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!)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests