RESOLVED: Cacti 1.0.6 Calls Undefined PHP Function

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

Moderators: Developers, Moderators

Post Reply
dbqandersons
Posts: 4
Joined: Tue Aug 09, 2016 5:04 pm

RESOLVED: Cacti 1.0.6 Calls Undefined PHP Function

Post by dbqandersons »

Hi Everyone,

Got a head-scratcher here.

Running a fresh install of Cacti 1.0.6 on a RHEL 6.8 server running PHP 5.3.3. This new install is nearly identical to a Cacti 1.0.4 environment that I am currently running with no issues on a nearly identical server (same RedHat and PHP versions).

After running through the install process, I get the following when I go to reset the admin user's password.

This page isn’t working
server.example.com is currently unable to handle this request.
HTTP ERROR 500


Found this in the httpd logs:

[Fri Mar 17 11:30:49 2017] [error] [client 172.17.64.196] PHP Fatal error: Call to undefined function password_verify() in /tools/www/html/cacti/auth_changepassword.php on line 113.

I found these code differences between the 1.0.4 and 1.0.6 versions of the auth_changepassword.php file in the vicinity of line 113

Version 1.0.6:
// Password and Confirmed password checks
if ((!password_verify(get_nfilter_request_var('current_password'), $user['password'])) && $user['password'] != $current_password_old) {
$bad_password = true;
$errorMessage = "<span class='badpassword_message'>" . __('Your current password is not correct. Please try again.') . "</span>";
}

if (password_verify(get_nfilter_request_var('password'), $user['password']) || $user['password'] == $password_old) {


The password_verify function call does not exist anywhere in the 1.0.4 version of the auth_changepassword.php file (area of the same functionality):

// Password and Confirmed password checks
if ($user['password'] != $current_password_new && $user['password'] != $current_password_old) {
$bad_password = true;
$errorMessage = "<span class='badpassword_message'>" . __('Your current password is not correct. Please try again.') . "</span>";
}

if ($user['password'] == $password_new || $user['password'] == $password_old) {


Looking for any advice as how to fix this error so I can keep moving forward with my 1.0.6 install. If nothing else, I guess I can install 1.0.4, but I will eventually want to upgrade my existing environment from 1.0.4 to 1.0.6 and this might break it.

Thanks everyone.
Last edited by dbqandersons on Fri Mar 24, 2017 7:00 am, edited 1 time in total.
dbqandersons
Posts: 4
Joined: Tue Aug 09, 2016 5:04 pm

RESOLVED Re: Cacti 1.0.6 Calls Undefined PHP Function

Post by dbqandersons »

This was resolved in Cacti 1.1.0.

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest