PHP version 5.6 compatibility (DSM 6.0)
Moderators: Developers, Moderators
PHP version 5.6 compatibility (DSM 6.0)
Hi,
I am running Cacti 0.8.8b for a few years on a Synology NAS.
Since I updated to DSM 6.0 Cacti doesn't collect any data.
Everything else is working properly.
For example when trying to debug datasource I can see actual data collected from the monitored devices.
In cacti.log there is no new entry from data collection.
I made sure that the command "php ... poller.php" is still in the crontab.
What I noticed is when I run directly from the command line :
"php /volume1/web/cacti/poller.php" there is no output to the console.
Then I noticed that the new DSM replaced PHP 5.5 by PHP 5.6.
Are all my troubles caused by the version 5.6 ?
If so which is the workaround ?
Regards,
Richard.
I am running Cacti 0.8.8b for a few years on a Synology NAS.
Since I updated to DSM 6.0 Cacti doesn't collect any data.
Everything else is working properly.
For example when trying to debug datasource I can see actual data collected from the monitored devices.
In cacti.log there is no new entry from data collection.
I made sure that the command "php ... poller.php" is still in the crontab.
What I noticed is when I run directly from the command line :
"php /volume1/web/cacti/poller.php" there is no output to the console.
Then I noticed that the new DSM replaced PHP 5.5 by PHP 5.6.
Are all my troubles caused by the version 5.6 ?
If so which is the workaround ?
Regards,
Richard.
Re: PHP version 5.6 compatibility (DSM 6.0)
I am running 0.8.8.g and I have exact same issue...
I really am clueless on where to look for the solution of this issue.
When I am running both poller and cmd.php nothing happens at all.
Does anyone has a clue where to start digging??
I really am clueless on where to look for the solution of this issue.
When I am running both poller and cmd.php nothing happens at all.
Does anyone has a clue where to start digging??
Re: PHP version 5.6 compatibility (DSM 6.0)
it has something to do with the php version indeed..... not sure yet what it is....
I have a workarround in place for now:
modify the /etc/crontab and change the poller execution path to the new PHP binary.
Log on to cacti and go to settings. Enter the new path of the php binary.
Et voila... everything is running again.
I have a workarround in place for now:
Code: Select all
cp /volume1/@appstore/PHP5.6/usr/local/bin/php56 /volume1/web/[your/cacti/path/]php56
chown http:users /volume1/web/[your/cacti/path/]php56
Log on to cacti and go to settings. Enter the new path of the php binary.
Et voila... everything is running again.
Re: PHP version 5.6 compatibility (DSM 6.0)
Thanks a lot it's a great discovery.altec wrote:it has something to do with the php version indeed..... not sure yet what it is....
I have a workarround in place for now:
Code: Select all
cp /volume1/@appstore/PHP5.6/usr/local/bin/php56 /volume1/web/[your/cacti/path/]php56 chown http:users /volume1/web/[your/cacti/path/]php56
Look at the version under /usr/bin and under PHP5.6/usr/local/bin/php56
ash-4.3# /usr/bin/php --version
PHP 5.6.11 (cli) (built: Apr 18 2016 19:55:19)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
ash-4.3# /volume1/@appstore/PHP5.6/usr/local/bin/php56 --version
PHP 5.6.17 (cli) (built: Mar 11 2016 18:03:14)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
So far actually I only tried against v5.6.11 !
Please note that today I am offered version 5.6.20 -from officially version 5.6.17.
I will update and investigate further this week-end.
Regards,
Richard.
Re: PHP version 5.6 compatibility (DSM 6.0)
My findings :RichM wrote: So far actually I only tried against v5.6.11 !
Please note that today I am offered version 5.6.20 -from officially version 5.6.17.
I will update and investigate further this week-end.
- /usr/bin/php comes with DSM 6.0 itself
- this /usr/bin/php is essential to package installation process. Don't mess with it ! (or be ready to dig the DSM .par file...)
- in DSM 5.2 php-cgi and php-fpm were also located under /usr/bin/
- in DSM 6.0, PHP package is installed under /volume1/@appstore/PHP5.6/usr/local/bin/php56 (symlinked to /usr/local/bin...)
So my recommendation would be to configure Cacti to use "/usr/local/bin/php56" in Cacti interface as well as in "crontab"
Re: PHP version 5.6 compatibility (DSM 6.0)
Thanks for your effortsRichM wrote:My findings :RichM wrote: So far actually I only tried against v5.6.11 !
Please note that today I am offered version 5.6.20 -from officially version 5.6.17.
I will update and investigate further this week-end.
- /usr/bin/php comes with DSM 6.0 itself
- this /usr/bin/php is essential to package installation process. Don't mess with it ! (or be ready to dig the DSM .par file...)
- in DSM 5.2 php-cgi and php-fpm were also located under /usr/bin/
- in DSM 6.0, PHP package is installed under /volume1/@appstore/PHP5.6/usr/local/bin/php56 (symlinked to /usr/local/bin...)
So my recommendation would be to configure Cacti to use "/usr/local/bin/php56" in Cacti interface as well as in "crontab"
I will do a recheck on my env to make sure nothing is messed up after the digging I did.
Re: PHP version 5.6 compatibility (DSM 6.0)
This post is already getting old, but I'm happy to confirm that the solution to use /usr/local/bin/php56 instead of /usr/bin/php works perfectly, many many thanks for that !!
Re: PHP version 5.6 compatibility (DSM 6.0)
Hi
A quick note : beware of the "open_basedir" PHP parameter. It may prevent your script from running.
In DSM 6 this parameter is set in "Web Station", "PHP Parameters" tab. There you have the option to personalize the PHP open_basedir parameter.
For example in my settings this value ends by :
:/opt/bin/rrdtool:/usr/local/bin:
because I am using /usr/local/bin/php56.
Regards,
A quick note : beware of the "open_basedir" PHP parameter. It may prevent your script from running.
In DSM 6 this parameter is set in "Web Station", "PHP Parameters" tab. There you have the option to personalize the PHP open_basedir parameter.
For example in my settings this value ends by :
:/opt/bin/rrdtool:/usr/local/bin:
because I am using /usr/local/bin/php56.
Regards,
Who is online
Users browsing this forum: No registered users and 5 guests