Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.23 - Cacti PHP 8.2 LDAP Errors with php-ldap Installed #5189

Closed
AiYoriAoshi opened this issue Jan 24, 2023 · 4 comments
Closed

1.2.23 - Cacti PHP 8.2 LDAP Errors with php-ldap Installed #5189

AiYoriAoshi opened this issue Jan 24, 2023 · 4 comments
Labels
bug Undesired behaviour unverified Some days we don't have a clue

Comments

@AiYoriAoshi
Copy link

AiYoriAoshi commented Jan 24, 2023

This is basically the same issue as #5140 just with LDAP.

2023.01.24 08:40:11 - CMDPHP PHP ERROR Backtrace: (/index.php[25]:include(), /include/auth.php[158]:require_once(), /auth_login.php[99]:ldap_login_process(), /lib/auth.php[3513]:cacti_ldap_auth(), /lib/ldap.php[74]:CactiErrorHandler())
2023.01.24 08:40:11 - ERROR PHP DEPRECATED: Creation of dynamic property Ldap::$password is deprecated in file: /var/www/cacti/lib/ldap.php on line: 74
2023.01.24 08:40:11 - CMDPHP PHP ERROR Backtrace: (/index.php[25]:include(), /include/auth.php[158]:require_once(), /auth_login.php[99]:ldap_login_process(), /lib/auth.php[3513]:cacti_ldap_auth(), /lib/ldap.php[73]:CactiErrorHandler())
2023.01.24 08:40:11 - ERROR PHP DEPRECATED: Creation of dynamic property Ldap::$username is deprecated in file: /var/www/cacti/lib/ldap.php on line: 73
2023.01.24 08:40:11 - CMDPHP PHP ERROR Backtrace: (/index.php[25]:include(), /include/auth.php[158]:require_once(), /auth_login.php[99]:ldap_login_process(), /lib/auth.php[3513]:cacti_ldap_auth(), /lib/ldap.php[71]:Ldap->__construct(), /lib/ldap.php[425]:CactiErrorHandler())
2023.01.24 08:40:11 - ERROR PHP DEPRECATED: Creation of dynamic property Ldap::$specific_password is deprecated in file: /var/www/cacti/lib/ldap.php on line: 425
2023.01.24 08:40:11 - CMDPHP PHP ERROR Backtrace: (/index.php[25]:include(), /include/auth.php[158]:require_once(), /auth_login.php[99]:ldap_login_process(), /lib/auth.php[3513]:cacti_ldap_auth(), /lib/ldap.php[71]:Ldap->__construct(), /lib/ldap.php[424]:CactiErrorHandler())
2023.01.24 08:40:11 - ERROR PHP DEPRECATED: Creation of dynamic property Ldap::$specific_dn is deprecated in file: /var/www/cacti/lib/ldap.php on line: 424
2023.01.24 08:40:11 - CMDPHP PHP ERROR Backtrace: (/index.php[25]:include(), /include/auth.php[158]:require_once(), /auth_login.php[99]:ldap_login_process(), /lib/auth.php[3513]:cacti_ldap_auth(), /lib/ldap.php[71]:Ldap->__construct(), /lib/ldap.php[423]:CactiErrorHandler())
2023.01.24 08:40:11 - ERROR PHP DEPRECATED: Creation of dynamic property Ldap::$search_filter is deprecated in file: /var/www/cacti/lib/ldap.php on line: 423

Fixed it by declaring public variables:

class Ldap {
+ public $dn,
+ $host,
+ $port,
+ $port_ssl,
+ $version,
+ $encryption,
+ $referrals,
+ $debug,
+ $group_require,
+ $group_dn,
+ $group_attrib,
+ $group_member_type,
+ $mode,
+ $search_base,
+ $search_filter,
+ $specific_dn,
+ $specific_password,
+ $username,
+ $password;

@AiYoriAoshi AiYoriAoshi added bug Undesired behaviour unverified Some days we don't have a clue labels Jan 24, 2023
@TheWitness
Copy link
Member

If you look at the release lib/ldap.php, it already includes all these variables as public. Are you sure you had the correct 1.2.23 lib/ldap.php?

@TheWitness
Copy link
Member

image

@TheWitness
Copy link
Member

Using PHP 8.2.1 on my system and pre-release of 1.2.24 and I see no such errors and lib/ldap.php has not been changed since the 1.2.23 release. Are you sure you have a good php?

image

@AiYoriAoshi
Copy link
Author

You are right, the lib/ldap.php file was indeed not correct, probably still from 1.2.22 release. Sorry for the inconvenience.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour unverified Some days we don't have a clue
Projects
None yet
Development

No branches or pull requests

2 participants