cacti do not see php extensions during installation

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

Moderators: Developers, Moderators

Post Reply
rcusnir
Posts: 2
Joined: Mon Apr 01, 2019 7:11 am

cacti do not see php extensions during installation

Post by rcusnir »

OS

Code: Select all

$ cat /etc/redhat-release 
CentOS Linux release 7.1.1503 (Core) 
Installed php

Code: Select all

$ rpm -qa|grep php
php71-runtime-1.0-1.el7.remi.x86_64
php71-php-pecl-zmq-1.1.3-5.el7.remi.x86_64
php71-php-pdo-7.1.27-1.el7.remi.x86_64
php71-php-process-7.1.27-1.el7.remi.x86_64
php71-php-pecl-igbinary-2.0.5-1.el7.remi.x86_64
php71-php-intl-7.1.27-1.el7.remi.x86_64
php71-php-mbstring-7.1.27-1.el7.remi.x86_64
php71-php-json-7.1.27-1.el7.remi.x86_64
php71-php-pear-1.10.5-5.el7.remi.noarch
php71-php-oci8-7.1.27-1.el7.remi.x86_64
php71-php-mcrypt-7.1.27-1.el7.remi.x86_64
php71-php-snmp-7.1.27-1.el7.remi.x86_64
php71-php-cli-7.1.27-1.el7.remi.x86_64
php71-php-ldap-7.1.27-1.el7.remi.x86_64
php71-php-mysqlnd-7.1.27-1.el7.remi.x86_64
php71-php-xml-7.1.27-1.el7.remi.x86_64
php71-1.0-1.el7.remi.x86_64
php71-php-7.1.27-1.el7.remi.x86_64
php71-php-gmp-7.1.27-1.el7.remi.x86_64
php71-php-common-7.1.27-1.el7.remi.x86_64
php71-php-gd-7.1.27-1.el7.remi.x86_64
CLI ini files

Code: Select all

Configuration File (php.ini) Path => /etc/opt/remi/php71
Loaded Configuration File => /etc/opt/remi/php71/php.ini
Scan this dir for additional .ini files => /etc/opt/remi/php71/php.d
Additional .ini files parsed => /etc/opt/remi/php71/php.d/20-bz2.ini,
/etc/opt/remi/php71/php.d/20-calendar.ini,
/etc/opt/remi/php71/php.d/20-ctype.ini,
/etc/opt/remi/php71/php.d/20-curl.ini,
/etc/opt/remi/php71/php.d/20-dom.ini,
/etc/opt/remi/php71/php.d/20-exif.ini,
/etc/opt/remi/php71/php.d/20-fileinfo.ini,
/etc/opt/remi/php71/php.d/20-ftp.ini,
/etc/opt/remi/php71/php.d/20-gd.ini,
/etc/opt/remi/php71/php.d/20-gettext.ini,
/etc/opt/remi/php71/php.d/20-gmp.ini,
/etc/opt/remi/php71/php.d/20-iconv.ini,
/etc/opt/remi/php71/php.d/20-intl.ini,
/etc/opt/remi/php71/php.d/20-json.ini,
/etc/opt/remi/php71/php.d/20-ldap.ini,
/etc/opt/remi/php71/php.d/20-mbstring.ini,
/etc/opt/remi/php71/php.d/20-mcrypt.ini,
/etc/opt/remi/php71/php.d/20-mysqlnd.ini,
/etc/opt/remi/php71/php.d/20-oci8.ini,
/etc/opt/remi/php71/php.d/20-pdo.ini,
/etc/opt/remi/php71/php.d/20-phar.ini,
/etc/opt/remi/php71/php.d/20-posix.ini,
/etc/opt/remi/php71/php.d/20-shmop.ini,
/etc/opt/remi/php71/php.d/20-simplexml.ini,
/etc/opt/remi/php71/php.d/20-snmp.ini,
/etc/opt/remi/php71/php.d/20-sockets.ini,
/etc/opt/remi/php71/php.d/20-sqlite3.ini,
/etc/opt/remi/php71/php.d/20-sysvmsg.ini,
/etc/opt/remi/php71/php.d/20-sysvsem.ini,
/etc/opt/remi/php71/php.d/20-sysvshm.ini,
/etc/opt/remi/php71/php.d/20-tokenizer.ini,
/etc/opt/remi/php71/php.d/20-xml.ini,
/etc/opt/remi/php71/php.d/20-xmlwriter.ini,
/etc/opt/remi/php71/php.d/20-xsl.ini,
/etc/opt/remi/php71/php.d/30-mysqli.ini,
/etc/opt/remi/php71/php.d/30-pdo_mysql.ini,
/etc/opt/remi/php71/php.d/30-pdo_oci.ini,
/etc/opt/remi/php71/php.d/30-pdo_sqlite.ini,
/etc/opt/remi/php71/php.d/30-wddx.ini,
/etc/opt/remi/php71/php.d/30-xmlreader.ini,
/etc/opt/remi/php71/php.d/40-igbinary.ini,
/etc/opt/remi/php71/php.d/40-zmq.ini
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
com_init_db => 0
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
check extensions

Code: Select all

# php cli_check.php extensions
{"ctype":{"cli":true,"web":false},"PDO":{"cli":true,"web":false},"zlib":{"cli":true,"web":false},"xml":{"cli":true,"web":false},"standard":{"cli":true,"web":false},"spl":{"cli":true,"web":false},"sockets":{"cli":true,"web":false},"simplexml":{"cli":true,"web":false},"session":{"cli":true,"web":false},"pdo_mysql":{"cli":true,"web":false},"pcre":{"cli":true,"web":false},"date":{"cli":true,"web":false},"openssl":{"cli":true,"web":false},"mbstring":{"cli":true,"web":false},"ldap":{"cli":true,"web":false},"json":{"cli":true,"web":false},"hash":{"cli":true,"web":false},"gmp":{"cli":true,"web":false},"gd":{"cli":true,"web":false},"filter":{"cli":true,"web":false},"posix":{"cli":true,"web":false}}
here is in installation wizzard:
cactiInstall.png
cactiInstall.png (81.79 KiB) Viewed 4061 times
please, somebody.. drive me where I have to dig.. in which direction?

Why cacti do not see php modules from web?
rcusnir
Posts: 2
Joined: Mon Apr 01, 2019 7:11 am

Re: cacti do not see php extensions during installation

Post by rcusnir »

Dear all, finally, I manage to fix this..

the problem was in php71 installation.

there was installed php using remi repository.

remi php pachages during installation create user profile for php version installed, and when user login, PATH is automatically set to the php binary.

all another applications works well with this, but cacti, looks like cacti during test, try to find php in path,but, it is not there.

simple add an alternative for php:

Code: Select all

alternatives --display php
php - status is manual.
 link currently points to /opt/remi/php71/root/usr/bin/php
/opt/remi/php71/root/usr/bin/php - priority 10
Current `best' version is /opt/remi/php71/root/usr/bin/php.
fix this problem, now wizzard can see installed php and modules.

I think that validation in wizzard should not relay on php binary, but it should do a check using pure php web installation.

May be I am wrong.. any way.. I am going to continue with my installation,. in hope that I didn't break something else
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti do not see php extensions during installation

Post by netniV »

Unfortunately, I have to correct you and say you are wrong. Cacti must do both Web and Cli checks for PHP statuses because the poller runs at the CLI level whilst the website runs at the Web level. As such, many users were getting weird errors that they did not even realise were because of the duality of their PHP installations.

In fact, on CentOS systems, it was very easily possible to have PHP 5.4 installed for the Web and 5.3.3 for the Cli. Since Cacti needs a minimum of 5.4 then you can see how running anything of Cacti's at the Cli level could potentially fail.
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
ooooooohsnap
Posts: 2
Joined: Fri May 17, 2019 8:08 am

Re: cacti do not see php extensions during installation

Post by ooooooohsnap »

Hi, I'm having the exact same problem but I only have 1 php version installed.

They all say cli - no.

How would I go about debugging this? I've been trying to fix this for 7 hours now :(

Thank you so much
ooooooohsnap
Posts: 2
Joined: Fri May 17, 2019 8:08 am

Re: cacti do not see php extensions during installation

Post by ooooooohsnap »

If anyone ever runs into this problem, it was a:

open_basedir

problem in php.ini

I tried adding all the paths to open_basedir but it didn't read it for some reason.

So I commented it:

; open_basedir

And now it works.

But this is a security problem.

Still trying to figure out how to add the paths correctly.

Thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests