Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed May 24, 2017 6:36 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: FIXED: Issue / Bug ? when activating Multiple AD / LDAP
PostPosted: Fri Mar 10, 2017 1:35 am 
Offline

Joined: Tue May 04, 2010 4:47 am
Posts: 17
Fixed with https://github.com/Cacti/cacti/commit/2 ... 5937e0f876

Hi Gents,

the LDAP implementation of 1.0.4 and 1.0.5 seem to work like a charm but it gives me headaches with Multiple AD / LDAP. The login form immediately and reproduceably changes like in attached picture which makes it POSSIBLE to login on one of the options using LDAP but local admin is noct possible anymore. (see cacti_ldap_multiple.jpg attached)

The debug log just shows the following for a single site request:
Code:
2017-03-10 06:13:48 - ERROR PHP WARNING: Illegal string offset 'selected' in file: /var/www/html/cacti/auth_login.php  on line: 585
2017-03-10 06:13:48 - CMDPHP PHP ERROR WARNING Backtrace: (/index.php: 25 include)(/include/auth.php: 82 include)(/auth_login.php: 585 CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
2017-03-10 06:13:48 - ERROR PHP WARNING: Illegal string offset 'name' in file: /var/www/html/cacti/auth_login.php  on line: 585
2017-03-10 06:13:48 - CMDPHP PHP ERROR WARNING Backtrace: (/index.php: 25 include)(/include/auth.php: 82 include)(/auth_login.php: 585 CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
2017-03-10 06:13:48 - ERROR PHP WARNING: Illegal string offset 'selected' in file: /var/www/html/cacti/auth_login.php  on line: 585
2017-03-10 06:13:48 - CMDPHP PHP ERROR WARNING Backtrace: (/index.php: 25 include)(/include/auth.php: 82 include)(/auth_login.php: 585 CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
2017-03-10 06:13:48 - ERROR PHP WARNING: Illegal string offset 'name' in file: /var/www/html/cacti/auth_login.php  on line: 585
2017-03-10 06:13:48 - CMDPHP PHP ERROR WARNING Backtrace: (/index.php: 25 include)(/include/auth.php: 82 include)(/auth_login.php: 585 CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
2017-03-10 06:13:48 - ERROR PHP WARNING: Illegal string offset 'selected' in file: /var/www/html/cacti/auth_login.php  on line: 585
2017-03-10 06:13:48 - CMDPHP PHP ERROR WARNING Backtrace: (/index.php: 25 include)(/include/auth.php: 82 include)(/auth_login.php: 585 CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
2017-03-10 06:13:48 - ERROR PHP WARNING: Illegal string offset 'name' in file: /var/www/html/cacti/auth_login.php  on line: 585
2017-03-10 06:13:48 - CMDPHP PHP ERROR WARNING Backtrace: (/index.php: 25 include)(/include/auth.php: 82 include)(/auth_login.php: 585 CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
2017-03-10 06:13:48 - ERROR PHP WARNING: Illegal string offset 'selected' in file: /var/www/html/cacti/auth_login.php  on line: 585
2017-03-10 06:13:48 - CMDPHP PHP ERROR WARNING Backtrace: (/index.php: 25 include)(/include/auth.php: 82 include)(/auth_login.php: 585 CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)
2017-03-10 06:13:48 - ERROR PHP WARNING: Illegal string offset 'name' in file: /var/www/html/cacti/auth_login.php  on line: 585
2017-03-10 06:13:48 - CMDPHP PHP ERROR WARNING Backtrace: (/index.php: 25 include)(/include/auth.php: 82 include)(/auth_login.php: 585 CactiErrorHandler)(/lib/functions.php: 4259 cacti_debug_backtrace)


auth_login.php reads:
Code:
<select id='realm' name='realm'><?php
     if (sizeof($realms)) {
          foreach($realms as $name => $realm) {
               print "\t\t\t\t\t<option value='" . $name . "'" . ($realm['selected'] ? ' selected':'') . '>' . htmlspecialchars($realm['name']) . "</option>\n";
          }
     }
?>
</select>

When I set it back to LDAP it becomes normal immediatley showing "Local" and "LDAP" as drop down options.



Quote:
Running latest Debian stable amd64 with following setup.

Cacti Version 1.0.5
Cacti OS unix
NET-SNMP Version NET-SNMP version: 5.7.2.1
RRDtool Version RRDTool 1.4.x


PHP Information
PHP Version 5.6.30-0+deb8u1
PHP OS Linux

Variable Current Value Recommended Value
version 5.5.54-0+deb8u1 >= 5.6
collation_server utf8_general_ci utf8_general_ci
character_set_client utf8 utf8
max_connections 151 >= 100
max_heap_table_size 380M >=378M
max_allowed_packet 16777216 >= 16777216
tmp_table_size 64M >= 64M
join_buffer_size 64M >= 64M
innodb_file_per_table ON ON
innodb_buffer_pool_size 1892M >=1892M
innodb_doublewrite OFF OFF
innodb_additional_mem_pool_size 80M >= 80M
innodb_lock_wait_timeout 50 >= 50
innodb_flush_log_at_trx_commit 2 2


As im not a programmer myself I ask for the wisdom of the Cacti developers to help me out here to be able to achieved what I'm told to implement.

Thanks
Chris


Attachments:
cacti_ldap_multiple.jpg
cacti_ldap_multiple.jpg [ 41.3 KiB | Viewed 7239 times ]


Last edited by choefing on Mon Mar 13, 2017 8:10 am, edited 1 time in total.
Top
 Profile  
 
 Post subject: Re: Issue / Bug ? when activating Multiple AD / LDAP
PostPosted: Sat Mar 11, 2017 8:53 pm 
Offline
Cacti User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 289
You need to log this in GitHub. Definitely some sort of bug.

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
 Post subject: Re: Issue / Bug ? when activating Multiple AD / LDAP
PostPosted: Mon Mar 13, 2017 8:09 am 
Offline

Joined: Tue May 04, 2010 4:47 am
Posts: 17
It seems its already fixed with https://github.com/Cacti/cacti/commit/2 ... 5937e0f876
Thanks Cigamit !

But for maybe further things, is there a "howto" for reporting bugs ? Never did that before.

Thanks
choefing


Top
 Profile  
 
 Post subject: Re: FIXED: Issue / Bug ? when activating Multiple AD / LDAP
PostPosted: Mon Mar 13, 2017 7:36 pm 
Offline
Cacti User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 289
http://www.cacti.net/issues.php

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group