[Solved] 0.8.8h to 1.0.4 CMDPHP PHP ERROR WARNING Backtrace

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
aletatone
Posts: 18
Joined: Mon Nov 22, 2010 5:27 am

[Solved] 0.8.8h to 1.0.4 CMDPHP PHP ERROR WARNING Backtrace

Post by aletatone »

Hi All,

I upgraded from 0.8.8h to 1.0.4 in Centos 7 Server.
After upgrade everything works fine (just some tuning in my.cfg file) and all graphs looks ok,
but when I check cacti log i see these error messages:

CMDPHP PHP ERROR WARNING Backtrace: (/poller_maintenance.php: 138 realtime_purge_cache)(/poller_maintenance.php: 160 unlink)(CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
ERROR PHP WARNING: unlink(/tmp/systemd-private-4bead0aadd70491d99a3b21cad8dd9e9-httpd.service-IYhlqq): Operation not permitted in file: /usr/share/cacti/poller_maintenance.php on line: 160
CMDPHP PHP ERROR WARNING Backtrace: (/poller_maintenance.php: 138 realtime_purge_cache)(/poller_maintenance.php: 160 unlink)(CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
ERROR PHP WARNING: unlink(/tmp/.Test-unix): Operation not permitted in file: /usr/share/cacti/poller_maintenance.php on line: 160
CMDPHP PHP ERROR WARNING Backtrace: (/poller_maintenance.php: 138 realtime_purge_cache)(/poller_maintenance.php: 160 unlink)(CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
ERROR PHP WARNING: unlink(/tmp/.font-unix): Operation not permitted in file: /usr/share/cacti/poller_maintenance.php on line: 160
CMDPHP PHP ERROR WARNING Backtrace: (/poller_maintenance.php: 138 realtime_purge_cache)(/poller_maintenance.php: 160 unlink)(CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
ERROR PHP WARNING: unlink(/tmp/.XIM-unix): Operation not permitted in file: /usr/share/cacti/poller_maintenance.php on line: 160
CMDPHP PHP ERROR WARNING Backtrace: (/poller_maintenance.php: 138 realtime_purge_cache)(/poller_maintenance.php: 160 unlink)(CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
ERROR PHP WARNING: unlink(/tmp/.ICE-unix): Operation not permitted in file: /usr/share/cacti/poller_maintenance.php on line: 160
CMDPHP PHP ERROR WARNING Backtrace: (/poller_maintenance.php: 138 realtime_purge_cache)(/poller_maintenance.php: 160 unlink)(CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
ERROR PHP WARNING: unlink(/tmp/.X11-unix): Operation not permitted in file: /usr/share/cacti/poller_maintenance.php on line: 160

Before upgrade I had realtime plugin that now is disappeared (i don't know if it could be part of the problem)

Any Idea?

Thanks
Ale

I'm using:

rrdtool-1.4.8-9.el7
mariadb-server-5.5.52
php-5.4.16-42
httpd-2.4.6-45
Last edited by aletatone on Wed Mar 15, 2017 6:18 am, edited 1 time in total.
aletatone
Posts: 18
Joined: Mon Nov 22, 2010 5:27 am

Re: 0.8.8h to 1.0.4 CMDPHP PHP ERROR WARNING Backtrace

Post by aletatone »

I found the solution to my problem.

Cacti was trying to delete files into /tmp/ directory because it was set as cache directory for realtime but it did not have permission to do it.
Into database i found:

MariaDB [cacti]> select * from settings where value like "%tmp%";
+---------------------+-------+
| name | value |
+---------------------+-------+
| realtime_cache_path | /tmp |
+---------------------+-------+

then I create a new directory:

/tmp/realtime_cache
chown cacti.cacti /tmp/realtime_cache
chmod 775 /tmp/realtime_cache

and then change parameter in cacti database:

MariaDB [cacti]> update settings set value = '/tmp/realtime_cache' where name = 'realtime_cache_path';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

MariaDB [cacti]> select * from settings where value like "%tmp%";
+---------------------+---------------------+
| name | value |
+---------------------+---------------------+
| realtime_cache_path | /tmp/realtime_cache |
+---------------------+---------------------+
1 row in set (0.01 sec)


Home it could help someone
eddi
Posts: 7
Joined: Wed Nov 26, 2014 9:58 am

Re: [Solved] 0.8.8h to 1.0.4 CMDPHP PHP ERROR WARNING Backtrace

Post by eddi »

It helped indeed; thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests