Php-ldap module not recognized after update

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

Moderators: Developers, Moderators

Post Reply
pulkrabek
Posts: 3
Joined: Fri Mar 16, 2018 7:43 am

Php-ldap module not recognized after update

Post by pulkrabek »

Hi, I have updated all packages at my server where is cacti running. After the update cacti cant recognize php-ldap module as installed. I wen through few links at google and came to conclusion that I am lost. Here are some information if you decide to help me. Thank you.

monitor ~ # php -v
PHP 5.3.3 (cli) (built: Mar 22 2017 12:27:09)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


monitor ~ # php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
snmp
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]

monitor ~ # rpm -qa | grep php
php-pear-Net-Socket-1.0.10-1.el6.noarch
php-process-5.3.3-49.el6.x86_64
php-pdo-5.3.3-49.el6.x86_64
php-mysql-5.3.3-49.el6.x86_64
php54-runtime-2.0-1.el6.x86_64
php54-php-process-5.4.40-4.el6.x86_64
php54-php-gd-5.4.40-4.el6.x86_64
php54-php-mysqlnd-5.4.40-4.el6.x86_64
php-imap-5.3.3-49.el6.x86_64
php-intl-5.3.3-49.el6.x86_64
php-common-5.3.3-49.el6.x86_64
php-devel-5.3.3-49.el6.x86_64
php-gd-5.3.3-49.el6.x86_64
php54-php-xml-5.4.40-4.el6.x86_64
php54-php-5.4.40-4.el6.x86_64
php54-php-pdo-5.4.40-4.el6.x86_64
php-pear-Net-SMTP-1.6.1-1.el6.noarch
php-pear-1.9.4-5.el6.noarch
php-xml-5.3.3-49.el6.x86_64
php-5.3.3-49.el6.x86_64
php-snmp-5.3.3-49.el6.x86_64
php54-php-cli-5.4.40-4.el6.x86_64
php54-2.0-1.el6.x86_64
php-ldap-5.3.3-49.el6.x86_64
php-pear-Auth-SASL-1.0.6-1.el6.noarch
php-cli-5.3.3-49.el6.x86_64
php-mbstring-5.3.3-49.el6.x86_64
php54-php-common-5.4.40-4.el6.x86_64
php54-php-pear-1.9.4-10.sc1.el6.noarch
php54-php-mbstring-5.4.40-4.el6.x86_64
php54-php-bcmath-5.4.40-4.el6.x86_64

monitor ~ # tail -f /var/log/cacti/cacti.log
2018/03/16 14:25:42 - ERROR PHP WARNING: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in file: /usr/share/cacti/lib/functions.php on line: 599
2018/03/16 14:25:42 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php: 537 process_poller_output)(/lib/poller.php: 390 db_fetch_assoc_prepared)(/lib/database.php: 384 cacti_log)(/lib/functions.php: 599 date)(CactiErrorHandler)(/lib/functions.php: 4416 cacti_debug_backtrace)
2018/03/16 14:25:42 - DBCALL ERROR: SQL Assoc Failed!, Error:1146, SQL:'SELECT SQL_NO_CACHE CONCAT(data_template_id, "_", data_name) AS keyname, data_source_names AS data_source_name FROM poller_data_template_field_mappings'
2018/03/16 14:25:42 - ERROR PHP WARNING: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in file: /usr/share/cacti/lib/functions.php on line: 599
2018/03/16 14:25:42 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php: 537 process_poller_output)(/lib/poller.php: 390 db_fetch_assoc_prepared)(/lib/database.php: 385 cacti_log)(/lib/functions.php: 599 date)(CactiErrorHandler)(/lib/functions.php: 4416 cacti_debug_backtrace)
2018/03/16 14:25:42 - DBCALL ERROR: SQL Assoc Failed!, Error: Table 'cacti.poller_data_template_field_mappings' doesn't exist
2018/03/16 14:25:42 - ERROR PHP WARNING: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in file: /usr/share/cacti/lib/functions.php on line: 599
2018/03/16 14:25:42 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php: 537 process_poller_output)(/lib/poller.php: 390 db_fetch_assoc_prepared)(/lib/database.php: 386 cacti_debug_backtrace)(/lib/functions.php: 4131 cacti_log)(/lib/functions.php: 599 date)(CactiErrorHandler)(/lib/functions.php: 4416 cacti_debug_backtrace)
2018/03/16 14:25:42 - CMDPHP SQL Backtrace: (/poller.php: 537 process_poller_output)(/lib/poller.php: 390 db_fetch_assoc_prepared)(/lib/database.php: 386 cacti_debug_backtrace)

/var/log/httpd/error_log

[Fri Mar 16 14:28:40 2018] [error] [client 172.25.4.27] PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/cacti/include/global_constants.php on line 206, referer: http://arpmon0.soma.cz/cacti/install/
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Php-ldap module not recognized after update

Post by netniV »

To enable LDAP, you need to run phpenmod ldap

For the timezone, you need to update the timezone setting in the php.ini file. If you update that and find it's not pulling in the correct setting, create a blank PHP file with <?php phpinifo();

When you navigate to that file, it will give you the PHP.INI location.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
pulkrabek
Posts: 3
Joined: Fri Mar 16, 2018 7:43 am

Re: Php-ldap module not recognized after update

Post by pulkrabek »

Hi netniV,
thank you for helping me. I aded this line LoadModule php5_module modules/libphp5.so into /etc/php.ini and all modules got loaded. I am not really sure why but i works. It loads all modules again and skip modules that are already loaded.

About the timezone, that is still problem. The keeps comming this error meseges in /var/log/cacti/cacti.log so I will have to work on that. Do you have any ideas ?

2018/03/19 10:32:48 - ERROR PHP WARNING: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in file: /usr/share/cacti/lib/functions.php on line: 599
2018/03/19 10:32:48 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php: 537 process_poller_output)(/lib/poller.php: 390 db_fetch_assoc_prepared)(/lib/database.php: 384 cacti_log)(/lib/functions.php: 599 date)(CactiErrorHandler)(/lib/functions.php: 4416 cacti_debug_backtrace)
2018/03/19 10:32:48 - DBCALL ERROR: SQL Assoc Failed!, Error:1146, SQL:'SELECT SQL_NO_CACHE CONCAT(data_template_id, "_", data_name) AS keyname, data_source_names AS data_source_name FROM poller_data_template_field_mappings'
2018/03/19 10:32:48 - ERROR PHP WARNING: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in file: /usr/share/cacti/lib/functions.php on line: 599
2018/03/19 10:32:48 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php: 537 process_poller_output)(/lib/poller.php: 390 db_fetch_assoc_prepared)(/lib/database.php: 385 cacti_log)(/lib/functions.php: 599 date)(CactiErrorHandler)(/lib/functions.php: 4416 cacti_debug_backtrace)
2018/03/19 10:32:48 - DBCALL ERROR: SQL Assoc Failed!, Error: Table 'cacti.poller_data_template_field_mappings' doesn't exist
2018/03/19 10:32:48 - ERROR PHP WARNING: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in file: /usr/share/cacti/lib/functions.php on line: 599
2018/03/19 10:32:48 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php: 537 process_poller_output)(/lib/poller.php: 390 db_fetch_assoc_prepared)(/lib/database.php: 386 cacti_debug_backtrace)(/lib/functions.php: 4131 cacti_log)(/lib/functions.php: 599 date)(CactiErrorHandler)(/lib/functions.php: 4416 cacti_debug_backtrace)
2018/03/19 10:32:48 - CMDPHP SQL Backtrace: (/poller.php: 537 process_poller_output)(/lib/poller.php: 390 db_fetch_assoc_prepared)(/lib/database.php: 386 cacti_debug_backtrace)


Also, there is still a lot of to repair as you can see, but I will try to fix this on my own and if I fail I will come back and ask :D... Only one thing that I would love your help with. The timezone... What should I do?

version 5.1.73 >= 5.6 MySQL 5.6+ and MariaDB 10.0+ are great releases, and are very good versions to choose. Make sure you run the very latest release though which fixes a long standing low level networking issue that was casuing spine many issues with reliability.
collation_server latin1_swedish_ci utf8mb4_unicode_ci When using Cacti with languages other than English, it is important to use the utf8mb4_unicode_ci collation type as some characters take more than a single byte.
character_set_client latin1 utf8mb4 When using Cacti with languages other than English, it is important ot use the utf8mb4 character set as some characters take more than a single byte.
max_connections 151 >= 100 Depending on the number of logins and use of spine data collector, MySQL will need many connections. The calculation for spine is: total_connections = total_processes * (total_threads + script_servers + 1), then you must leave headroom for user connections, which will change depending on the number of concurrent login accounts.
max_heap_table_size 16M >=49M If using the Cacti Performance Booster and choosing a memory storage engine, you have to be careful to flush your Performance Booster buffer before the system runs out of memory table space. This is done two ways, first reducing the size of your output column to just the right size. This column is in the tables poller_output, and poller_output_boost. The second thing you can do is allocate more memory to memory tables. We have arbitrarily chosen a recommended value of 10% of system memory, but if you are using SSD disk drives, or have a smaller system, you may ignore this recommendation or choose a different storage engine. You may see the expected consumption of the Performance Booster tables under Console -> System Utilities -> View Boost Status.
max_allowed_packet 1048576 >= 16777216 With Remote polling capabilities, large amounts of data will be synced from the main server to the remote pollers. Therefore, keep this value at or above 16M.
tmp_table_size 16M >= 64M When executing subqueries, having a larger temporary table size, keep those temporary tables in memory.
join_buffer_size 0.125M >= 64M When performing joins, if they are below this size, they will be kept in memory and never written to a temporary file.
innodb_file_per_table OFF ON When using InnoDB storage it is important to keep your table spaces separate. This makes managing the tables simpler for long time users of MySQL. If you are running with this currently off, you can migrate to the per file storage by enabling the feature, and then running an alter statement on all InnoDB tables.
innodb_buffer_pool_size 8M >=243M InnoDB will hold as much tables and indexes in system memory as is possible. Therefore, you should make the innodb_buffer_pool large enough to hold as much of the tables and index in memory. Checking the size of the /var/lib/mysql/cacti directory will help in determining this value. We are recommending 25% of your systems total memory, but your requirements will vary depending on your systems size.
innodb_doublewrite ON OFF With modern SSD type storage, this operation actually degrades the disk more rapidly and adds a 50% overhead on all write operations.
innodb_additional_mem_pool_size 1M >= 80M This is where metadata is stored. If you had a lot of tables, it would be useful to increase this.
innodb_lock_wait_timeout 50 >= 50 Rogue queries should not for the database to go offline to others. Kill these queries before they kill your system.
pulkrabek
Posts: 3
Joined: Fri Mar 16, 2018 7:43 am

Re: Php-ldap module not recognized after update

Post by pulkrabek »

Well what i said in previos reply worked for cacti but zabbix stopped working after that. Strange...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest