The PHP binary location is not valid

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
hsimon
Posts: 8
Joined: Sun Mar 05, 2023 4:08 am

The PHP binary location is not valid

Post by hsimon »

I get following error on initialisation of cacti:
PHP Binary /opt/Apache81/bin/php >= Error The PHP binary location is not valid and must be updated.
>= Warning Update the path_php_binary value in the settings table.
The location is valid and php is located in this path. Does cacti requires php in a certain path or directory.
I have this problem with 1.23 and 1.24. I haven’t’ tried an older version.
How can this overcome? This is the only error and all others are green and ok, including installed php modules.
Horst
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: The PHP binary location is not valid

Post by TheWitness »

Better symlink to /usr/bin/php
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
hsimon
Posts: 8
Joined: Sun Mar 05, 2023 4:08 am

Re: The PHP binary location is not valid

Post by hsimon »

I did this and still gives the same error.
Following are the database settings and php -v output. Can this check be bypassed or any log information obtained.

MariaDB [cacti]> select * from settings where name = 'path_php_binary';
+-----------------+--------------+
| name | value |
+-----------------+--------------+
| path_php_binary | /usr/bin/php |
+-----------------+--------------+
1 row in set (0.000 sec)


[~] # /usr/bin/php -v
PHP 8.1.9 (cli) (built: Aug 3 2022 07:06:10) (ZTS)
Copyright (c) The PHP Group
Zend Engine v4.1.9, Copyright (c) Zend Technologies

Thanks and Regards,
Horst
Attachments
Screenshot 2023-03-06 at 09.19.16.png.zip
(221.48 KiB) Downloaded 108 times
hsimon
Posts: 8
Joined: Sun Mar 05, 2023 4:08 am

Re: The PHP binary location is not valid

Post by hsimon »

In addition to last information this is in the cacti log:
2023-03-06 09:18:22 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
2023-03-06 12:59:00 - AUTH LOGIN: User 'admin' authenticated
2023-03-06 12:59:02 - ERROR PHP ERROR: Uncaught ValueError: parse_ini_file(): Argument #1 ($filename) cannot be empty in /share/CACHEDEV1_DATA/.qpkg/Apache81/share/htdocs/cacti
/lib/utility.php:1763 Stack trace: #0 /share/CACHEDEV1_DATA/.qpkg/Apache81/share/htdocs/cacti/lib/utility.php(1763): parse_ini_file() #1 /share/CACHEDEV1_DATA/.qpkg/Apache81/sh
are/htdocs/cacti/install/cli_check.php(43): utility_php_verify_recommends() #2 {main} thrown in file: /share/CACHEDEV1_DATA/.qpkg/Apache81/share/htdocs/cacti/lib/utility.php on
line: 1763
2023-03-06 12:59:02 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: The PHP binary location is not valid

Post by TheWitness »

Why such a non-standard install?
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
hsimon
Posts: 8
Joined: Sun Mar 05, 2023 4:08 am

Re: The PHP binary location is not valid

Post by hsimon »

It is on a qnap nas and this is where apache installs including php.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: The PHP binary location is not valid

Post by TheWitness »

Well, it's a bit non-standard. Cacti should work, but you will have to do some debugging to figure things out.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
hsimon
Posts: 8
Joined: Sun Mar 05, 2023 4:08 am

Re: The PHP binary location is not valid

Post by hsimon »

I got past the initialisation, by doing following:

Installed cacti 1.2.23 and imported a cacti 1.2.23 database from another server, used phpmyadmin to change all the relevant
path statements in the database. This gave me an successfull logon and all the displays are working, removed all the existing graphs and devices. I can create new devices, but it displays following error messages:
Sorry, we could not process your last action.
Save Failed due to field input errors (Check red fields).

I cannot see any red fields and it will not create graphs.

The cacti.log has this information:
CMDPHP Filter Variable: trim, Must have a default and none is set

I don't know is this is related to the error, the polling seems to be ok.

I have attached a screen shot from the error, path information and the cacti.log file. Where do I need to look now to find out about this error?

Horst
Screenshot 2023-03-07 at 16.55.58.png.zip
(437.61 KiB) Downloaded 75 times
Screenshot 2023-03-07 at 16.34.50.png.zip
(33.35 KiB) Downloaded 92 times
cacti.log.zip
(2.4 KiB) Downloaded 94 times
hsimon
Posts: 8
Joined: Sun Mar 05, 2023 4:08 am

Re: The PHP binary location is not valid

Post by hsimon »

By uninstalling thold and monitor this error disappeared, but I might not be able to go further, since the rrdtool available for Qnap is on version 1.2.23, which does not have the pango-markup option.

Can I run run rrdtool without this option and if so where do I remove it?

Horst
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: The PHP binary location is not valid

Post by TheWitness »

Just use PNG as your image format instead of SVG.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
hsimon
Posts: 8
Joined: Sun Mar 05, 2023 4:08 am

Re: The PHP binary location is not valid

Post by hsimon »

I did this but no difference in graph creation, following is the debug trace:

RRDtool Command:

/opt/bin/rrdtool graph - \
--imgformat=PNG \
--start='-86400' \
--end='-300' \
--pango-markup \
--title='Melbourne QNAP NAS - Used Space - /tmp' \
--vertical-label='bytes' \
--slope-mode \
--base=1024 \
--height=200 \
--width=700 \
--tabwidth '40' \
--rigid \
--alt-autoscale-max \
--lower-limit='0' \
COMMENT:"From 07/03/2023 09\:42\:16 To 08/03/2023 09\:37\:16\c" \
COMMENT:" \n" \
--color BACK#F3F3F3 \
--color CANVAS#FDFDFD \
--color SHADEA#CBCBCB \
--color SHADEB#999999 \
--color FONT#000000 \
--color AXIS#2C4D43 \
--color ARROW#2C4D43 \
--color FRAME#2C4D43 \
--font TITLE:11: \
--font AXIS:8: \
--font LEGEND:9: \
--font UNIT:8: \
--slope-mode \
--watermark 'Generated by Cacti®' \
DEF:a='/share/CACHEDEV1_DATA/Web/htdocs/cacti/rra/melbourne_qnap_nas_hdd_used_1031.rrd':'hdd_used':AVERAGE \
DEF:b='/share/CACHEDEV1_DATA/Web/htdocs/cacti/rra/melbourne_qnap_nas_hdd_used_1031.rrd':'hdd_total':AVERAGE \
CDEF:cdefi='a,b,-' \
AREA:a#FF00007F:'Used ' \
GPRINT:a:LAST:'Current\:%8.2lf %s' \
GPRINT:a:AVERAGE:'Average\:%8.2lf %s' \
GPRINT:a:MAX:'Maximum\:%8.2lf %s\n' \
LINE3:b#0000007F:'Total' \
GPRINT:b:LAST:'Current\:%8.2lf %s' \
GPRINT:b:AVERAGE:'Average\:%8.2lf %s' \
GPRINT:b:MAX:'Maximum\:%8.2lf %s\n' \
AREA:cdefi#00FF00FF:'Free\:':STACK \
GPRINT:cdefi:LAST:'Current\:%8.2lf %s' \
GPRINT:cdefi:AVERAGE:'Average\:%8.2lf %s' \
GPRINT:cdefi:MAX:'Maximum\:%8.2lf %s\n' \
LINE1:b#000000FF: \
LINE1:a#FF0000FF:

RRDtool Command lengths = 1381 characters.

RRDtool Says:

ERROR: unknown option '--pango-markup'
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: The PHP binary location is not valid

Post by TheWitness »

True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
hsimon
Posts: 8
Joined: Sun Mar 05, 2023 4:08 am

Re: The PHP binary location is not valid

Post by hsimon »

I checked with previous posts and it mentioned that rrdtool 1.2.2 cannot be used with cacti versions after 0.8.8,
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: The PHP binary location is not valid

Post by TheWitness »

Oh, I did not note that. Yea, way too old of a version.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests