Cacti upgrade 0.8.8h to 1.0.1 issues

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
gmuller2
Posts: 4
Joined: Thu Feb 09, 2017 12:57 am

Cacti upgrade 0.8.8h to 1.0.1 issues

Post by gmuller2 »

I'm running Cacti 0.8.8h on Oracle Linux 5.11. Trying to upgrade to version 1.0.1 via tar installation file. After completing the upgrade steps as per documentation I get a blank page instead of the login page. In the Apache error_log I see the following error:
[Thu Feb 09 10:04:45 2017] [error] [client x.x.x.x] PHP Fatal error: Undefined class constant 'MYSQL_ATTR_FOUND_ROWS' in /var/www/html/cacti-1.0.1/lib/database.php on line 52
Running 'php' from the command line I get the following:
# php /var/www/html/cacti-1.0.1/index.php
PHP Fatal error: Undefined class constant 'MYSQL_ATTR_FOUND_ROWS' in /var/www/html/cacti-1.0.1/lib/database.php on line 52
I have reviewed all the upgrade steps to make sure that nothing was missed. The "include/config.php" file has been updated and the MySQL timezone instruction for Cacti 1.x were also followed.

What am I missing? Do I need to upgrade PHP, MySQL, etc too for Cacti 1.0.1?

My installed software package versions are:
# yum list installed php-* mysql* httpd* rrdtool* mariadb*
Loaded plugins: priorities, security
1 packages excluded due to repository priority protections
Installed Packages
httpd.x86_64 2.2.3-92.0.1.el5_11 installed
mysql.i386 5.0.95-5.el5_9 installed
mysql.x86_64 5.0.95-5.el5_9 installed
mysql-devel.i386 5.0.95-5.el5_9 installed
mysql-devel.x86_64 5.0.95-5.el5_9 installed
mysql-server.x86_64 5.0.95-5.el5_9 installed
php.x86_64 5.1.6-45.el5_11 installed
php-cli.x86_64 5.1.6-45.el5_11 installed
php-common.x86_64 5.1.6-45.el5_11 installed
php-mysql.x86_64 5.1.6-45.el5_11 installed
php-pdo.x86_64 5.1.6-45.el5_11 installed
php-snmp.x86_64 5.1.6-45.el5_11 installed
php-xml.x86_64 5.1.6-45.el5_11 installed
rrdtool.x86_64 1.4.5-1.wrl installed
rrdtool-perl.x86_64 1.4.5-1.wrl installed
Any help is greatly appreciated!
cigamit
Developer
Posts: 3368
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Cacti upgrade 0.8.8h to 1.0.1 issues

Post by cigamit »

I believe the minimum requirements are now higher

- PHP 5.3+
- MySQL 5.1+
- RRDTool 1.2+, 1.5+ recommended
- NET-SNMP 5.5+
- Web Server with PHP support

The issue you posted I believe is an issue with versions up to PHP 5.3
gmuller2
Posts: 4
Joined: Thu Feb 09, 2017 12:57 am

Re: Cacti upgrade 0.8.8h to 1.0.1 issues

Post by gmuller2 »

Thank you for your reply. Upgrading PHP to 5.3 (latest available version on OL5) was enough for me to be able to upgrade to Cacti 1.0.1

However, I now have a new problem in that none of the graphs showing any data since the upgrade. Further, in the Cacti Log I see errors like the following:
2017-02-13 17:11:28 - PHPSVR WARNING: Function does not exist INC: 'ss_multicpu_avg.php' FUNC: 'ss_multicpu_avg' PARMS: 'srvdom01.intranet.example.wa.gov.au public 1 161 5000'
2017-02-13 17:11:28 - PHPSVR WARNING: PHP Script File to be included, does not exist
2017-02-13 17:11:28 - SPINE: Poller[1] Device[796] Description[SRVDOM01] ERROR: Empty result [srvdom01.intranet.example.wa.gov.au]: '/usr/bin/php -q /var/www/html/cacti-0.8.8h/scripts/wmi.php -h 'srvdom01.intranet.example.wa.gov.au' -u '/etc/cacti/cactiwmi.pw' -w 'Win32_LogicalDisk' -n '' -k 'DeviceID' -v 'C:' -c 'Size,FreeSpace''
Cacti 1.0.1 is installed in /var/www/html/cacti-1.0.1 (with symlink /var/www/html/cacti).
The old Cacti 0.8.8h installation has been moved to /var/www/html/cacti-0.8.8h.

I had not only stopped/started Apache before/after renaming/moving the directories, but also have rebooted the Cacti server. Why is the Spine poller stilling trying to run scripts in the old location?
I can find any references in httpd.conf, spine.conf, the data templates or the <path_cacti>/scripts/* files.

This has got me stumped. Any help/suggestions are appreciated.
gmuller2
Posts: 4
Joined: Thu Feb 09, 2017 12:57 am

Re: Cacti upgrade 0.8.8h to 1.0.1 issues

Post by gmuller2 »

I managed to resolve the above issue by not using a symlink for cacti (-> cacti-1.0.1). I removed the symlink /var/www/html/cacti and renamed cacti-1.0.1 to /var/www/html/cacti (as per the upgrade instructions, step 3).
I when had to go to each "Data Input Methods" and "Data Queries" and click on "Save". It appears that the value of <path_cacti> was cached from the last time the data collector was saved. Off cause if you strictly follow the upgrade instructions and renamed the folder as above, then it will not be a problem. Lesson learned. :wink:
csalcedo1024
Posts: 5
Joined: Tue Aug 11, 2015 12:58 pm

Re: Cacti upgrade 0.8.8h to 1.0.1 issues

Post by csalcedo1024 »

Hi,

I am trying to upgrade to 1.04 from .8.8h and I cant get it to work.

I rename the the directory to cacti and put it in the same place as the cacti.old and I get a err 500 from the webserver and get this in the error_log life:

[:error] [pid 7008] [client 192.168.1.146:64242] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

[:error] [pid 7008] [client 192.168.1.146:64242] PHP Fatal error: Unknown: Failed opening required '/usr/share/cacti/index.php' (include_pa th='.:/usr/share/pear:/usr/share/php') in Unknown on line 0

When I rename everything back (to original versions) it works
So there seams to be an issue with the PHP. Installed version is PHP 5.4.16

Any help would be appreciated

Thanks
gmuller2
Posts: 4
Joined: Thu Feb 09, 2017 12:57 am

Re: Cacti upgrade 0.8.8h to 1.0.1 issues

Post by gmuller2 »

Hi,

Have you followed all the upgrade instructions in the Cacti documentation? They are found here: http://docs.cacti.net/manual:100:1_inst ... ding_cacti

Check the ownership and permissions of your /usr/share/cacti directory structure. The permission denied error suggest that the owner of the webserver does not have read permissions to /usr/share/cacti/index.php (and other) file(s). Compare the ownership and permissions with you current installation before you rename your folders.

I hope that helps ...
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests