You’ve lost me a bit there, the guide in the emoncms repo is complete, we do not edit php.ini as a rule. The correct way is to use phpenmod top create symlinks in the necessary places to allow php to dynamically create it’s settings.
Aside from installing the Debian packages for php-pear and php-dev etc included in the main package list, installing the redis extension consists of the following 4 steps
- Updating the PECL index channel with
sudo pecl channel-update pecl.php.net
- Install the redis package with
sudo pecl install redis
(or maybe a specific version)
- Make that extension “available” using
printf "extension=redis.so" | sudo tee /etc/php/7.0/mods-available/redis.ini 1>&2
to add a file in “mods-available”
- Enable the extension with
sudo phpenmod redis
at that point you should be done!
If there are any further steps required due to unusual paths etc because of the environment you are installing to I’m afraid I do not know about those.
running pecl info redis
to tell you what version phpredis is installed ie available to enable.
running php -m
will tell you what modules are enabled, “redis” should be hopefully be listed.
from the local machine you should also be able to navigate to http://myserver/emoncms/php-info.php to see a fair bit of info and at the end there should be a “redis” section that tells you about the phpredis extension.
And also if you look at the last section on the admin page there should be a “redis” entry with version number in there too if it’s successfully enabled, installed but not enabled modules are not listed there.
This is not to be confused with the Redis server section on the admin page which is the database application itself, not the php extension, that is what I believe you are looking at when you say “Emoncms reports Redis 3.06” as you have already said you’ve installed v4.0.2 and mentioned “rolling back to 3.1.6” which you cannot do if you are on 3.0.6.
Here is a “System information” dump that I have just pinched from a recent post by @Paul
Server Information
|
|
|
Emoncms |
Version |
9.8.29 : 2018.05.01 |
|
Modules |
Administration : App v1.1.0 : Dashboard v1.1.1 : EventProcesses : Feed : Input : CoreProcess : Schedule : Time : User : Visualisation |
Server |
OS |
Linux 4.9.59-v7+ |
|
Host |
raspberrypi raspberrypi (127.0.1.1) |
|
Date |
2018-05-03 15:43:33 BST |
|
Uptime |
15:43:33 up 6 min, 3 users, load average: 0.45, 0.98, 0.62 |
HTTP |
Server |
Apache/2.4.25 (Raspbian) HTTP/1.1 CGI/1.1 443 |
MySQL |
Version |
5.5.5-10.1.23-MariaDB-9+deb9u1 |
|
Host |
localhost (127.0.0.1) |
|
Date |
2018-05-03 15:43:33 (UTC 01:00) |
|
Stats |
Uptime: 394 Threads: 3 Questions: 21 Slow queries: 0 Opens: 19 Flush tables: 1 Open tables: 13 Queries per second avg: 0.053 |
Redis |
Version |
3.2.6 |
|
Host |
localhost:6379 (127.0.0.1) |
|
Size |
130 keys (701.08K) |
|
Uptime |
0 days |
MQTT |
Version |
1.4.10 |
|
Host |
localhost:1883 (127.0.0.1) |
Pi |
CPU Temp |
54.23°C |
Memory |
RAM |
Used: 39.82% Total: 875.78 MB Used: 348.72 MB Free: 527.06 MB |
|
Swap |
Used: 0.00% Total: 100 MB Used: 0 B Free: 100 MB |
Disk |
Mount |
Stats |
|
/ |
Used: 67.00% Total: 6.86 GB Used: 4.6 GB Free: 1.93 GB |
|
/boot |
Used: 50.62% Total: 41.15 MB Used: 20.83 MB Free: 20.32 MB |
|
/mnt/data |
Used: 17.82% Total: 458.49 GB Used: 81.71 GB Free: 376.78 GB |
PHP |
Version |
7.0.27-0+deb9u1 (Zend Version 3.0.0) |
|
Modules |
apache2handler : bz2 v7.0.27-0+deb9u1 : calendar v7.0.27-0+deb9u1 : Core v7.0.27-0+deb9u1 : ctype v7.0.27-0+deb9u1 : curl v7.0.27-0+deb9u1 : date v7.0.27-0+deb9u1 : dio v0.1.0 : dom v20031129 : exif v7.0.27-0+deb9u1 : fileinfo v1.0.5 : filter v7.0.27-0+deb9u1 : ftp v7.0.27-0+deb9u1 : gd v7.0.27-0+deb9u1 : gettext v7.0.27-0+deb9u1 : hash v1.0 : iconv v7.0.27-0+deb9u1 : json v1.4.0 : libxml v7.0.27-0+deb9u1 : mbstring v7.0.27-0+deb9u1 : mcrypt v7.0.27-0+deb9u1 : mosquitto v0.4.0 : mysqli v7.0.27-0+deb9u1 : mysqlnd : openssl v7.0.27-0+deb9u1 : pcre v7.0.27-0+deb9u1 : PDO v7.0.27-0+deb9u1 : pdo_mysql v7.0.27-0+deb9u1 : Phar v2.0.2 : posix v7.0.27-0+deb9u1 : readline v7.0.27-0+deb9u1 : redis v3.1.6 : Reflection v7.0.27-0+deb9u1 : session v7.0.27-0+deb9u1 : shmop v7.0.27-0+deb9u1 : SimpleXML v7.0.27-0+deb9u1 : sockets v7.0.27-0+deb9u1 : SPL v7.0.27-0+deb9u1 : standard v7.0.27-0+deb9u1 : sysvmsg v7.0.27-0+deb9u1 : sysvsem v7.0.27-0+deb9u1 : sysvshm v7.0.27-0+deb9u1 : tokenizer v7.0.27-0+deb9u1 : wddx v7.0.27-0+deb9u1 : xml v7.0.27-0+deb9u1 : xmlreader v7.0.27-0+deb9u1 : xmlwriter v7.0.27-0+deb9u1 : xsl v7.0.27-0+deb9u1 : Zend OPcache v7.0.27-0+deb9u1 : zip v1.13.5 : zlib v7.0.27-0+deb9u1 : |
|
|
|
In there you will see the Redis server is in it’s own section and at version 3.2.6 and in the last “PHP - Modules” section, the Redis extension for PHP is listed as “redis v3.1.6” (listed means it’s enabled).
As for the Sync module, I think we should confirm redis is ok before attempting the sync module, there are many other bits to that process that could stand between a button press and a succesful download, not just redis. It needs to create a temp flag file, there needs to be a cronjob running to pick up on that flag and run a script which has to reach the server and be able to write it locally so there are many permissions and paths that may need checking if this is not a straightforward emonPi/emonSD.
So are you able to confirm redis is both installed and enabled using one or more of the above methods?
Since this is a fresh install and on a more exotic OS/machine and you are trying to use some very new software that hasn’t been widely tested, perhaps you should roll-back to 3.1.6, there are too many unknowns, if the module is enabled and the sync module still doesn’t work we don’t know if it’s due to a version 4.0.2 issue or not, at least with 3.1.6 we know that should work ok and reduces the unknowns to just an uncommon environment and an untested emoncms module.