sensorlogger
sensorlogger copied to clipboard
PHP 7.3 support
Platform you are using nextcloud
Your Goals Run the plugin on archlinux with PHP 7.3 in a nextcloud instance.
Your Question
- Does sensorlogger work with PHP 7.3?
- Or are there any known issues why it shouldn't work?
Thanks in advance.
Hi @c99ipnerd
Hm. There shouldn't be a serious problem using PHP 7.3 and SensorLogger as far as I can tell. But to be honest, last testet PHP Version was 7.2.15. It would be nice if you could take the effort to give it a try and contribute your experience.
thanx Alex
Sure, once I have some free time I gladly do testing.
Tested sensorlogger 0.1.0 on nextcloud 15.0.7 archlinux with php 7.3.4. I was able to put some test sensor data into. The nextcloud.log didn't show any errors.
Should I test something else too, or would you consider bumping the supported php version?
@c99ipnerd Thanx for your effort.
SensorLogger 0.1.1 for nextcloud released apps.nextcloud.com/apps/sensorlogger
Please check it out and let me know if something does not work as expected.
Thanx for your support
Hello together,
thank you for this app.
What can I do?
Hi @Himra. Thanx!
If you host your Nextcloud instance on your own or you have ssh or ftp access to the install directory and required write permissions to the file info.xml you could try to change
https://github.com/alexstocker/sensorlogger/blob/0.1.3nc/appinfo/info.xml#L33 (app/sensorlogger/appinfo/info.xml)
from
<php min-version="7.0" max-version="7.3"/>
to
<php min-version="7.0" max-version="7.4"/>
Otherwise you need to wait for the next SensorLogger Release for nextcloud (0.1.4 or 0.2.0)
Hi @Himra. Thanx!
If you host your Nextcloud instance on your own or you have ssh or ftp access to the install directory and required write permissions to the file info.xml you could try to change
https://github.com/alexstocker/sensorlogger/blob/0.1.3nc/appinfo/info.xml#L33 (app/sensorlogger/appinfo/info.xml)
from
<php min-version="7.0" max-version="7.3"/>
to
<php min-version="7.0" max-version="7.4"/>
Otherwise you need to wait for the next SensorLogger Release for nextcloud (0.1.4 or 0.2.0)
This did not work for me on nextcloud 20.0.1. I changed the max-version as you described. After that i was able to activate it, but when I want to access it in the UI i get an error message displayed.
Somewhere in the logs I found this line Base table or view not found: 1146 Table 'owncloud.oc_sensorlogger_devices' doesn't exist
.
So it seems to me that sensorlogger is not install correctly. What can i do about it?
Btw. thank you for this app @alexstocker!
Here is the full line of the error log:
{"reqId":"123","level":3,"time":"2020-11-27T18:20:18+00:00","remoteAddr":"123","user":"grassmann","app":"index","method":"GET","url":"/index.php/apps/sensorlogger/","message":{"Exception":"Doctrine\\DBAL\\Exception\\TableNotFoundException","Message":"An exception occurred while executing 'SELECT *,
sd.
user_idAS
user_id,
sd.
idAS
id,
sdt.
device_type_nameAS
device_type_name,
sdg0.
device_group_nameAS
device_group_name,
sdg1.
device_group_nameAS
device_group_parent_nameFROM
oc_sensorlogger_devices
sdLEFT JOIN
oc_sensorlogger_device_types
sdtON sdt.id = sd.type_id LEFT JOIN
oc_sensorlogger_device_groups
sdg0ON sdg0.id = sd.group_id LEFT JOIN
oc_sensorlogger_device_groups
sdg1ON sdg1.id = sd.group_parent_id WHERE sd.user_id = \"user123\" ORDER BY
sd.
idDESC LIMIT 100':\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'owncloud.oc_sensorlogger_devices' doesn't exist","Code":0,"Trace":[{"file":"/var/www/mycloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":169,"function":"convertException","class":"Doctrine\\DBAL\\Driver\\AbstractMySQLDriver","type":"->"},{"file":"/var/www/mycloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":149,"function":"wrapException","class":"Doctrine\\DBAL\\DBALException","type":"::"},{"file":"/var/www/mycloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":914,"function":"driverExceptionDuringQuery","class":"Doctrine\\DBAL\\DBALException","type":"::"},{"file":"/var/www/mycloud/lib/private/DB/Connection.php","line":202,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/mycloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":206,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/mycloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":217,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/mycloud/apps/sensorlogger/lib/Devices.php","line":41,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/mycloud/apps/sensorlogger/controller/sensorloggercontroller.php","line":355,"function":"getDevices","class":"OCA\\SensorLogger\\Devices","type":"::"},{"file":"/var/www/mycloud/apps/sensorlogger/controller/sensorloggercontroller.php","line":148,"function":"getWidgets","class":"OCA\\SensorLogger\\Controller\\SensorLoggerController","type":"->"},{"file":"/var/www/mycloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"index","class":"OCA\\SensorLogger\\Controller\\SensorLoggerController","type":"->"},{"file":"/var/www/mycloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/mycloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/mycloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/mycloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/mycloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/mycloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php","Line":42,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDOException","Message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'owncloud.oc_sensorlogger_devices' doesn't exist","Code":"42S02","Trace":[{"file":"/var/www/mycloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":911,"function":"query","class":"Doctrine\\DBAL\\Driver\\PDOConnection","type":"->"},{"file":"/var/www/mycloud/lib/private/DB/Connection.php","line":202,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/mycloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":206,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/mycloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":217,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/mycloud/apps/sensorlogger/lib/Devices.php","line":41,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/mycloud/apps/sensorlogger/controller/sensorloggercontroller.php","line":355,"function":"getDevices","class":"OCA\\SensorLogger\\Devices","type":"::"},{"file":"/var/www/mycloud/apps/sensorlogger/controller/sensorloggercontroller.php","line":148,"function":"getWidgets","class":"OCA\\SensorLogger\\Controller\\SensorLoggerController","type":"->"},{"file":"/var/www/mycloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"index","class":"OCA\\SensorLogger\\Controller\\SensorLoggerController","type":"->"},{"file":"/var/www/mycloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/mycloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/mycloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/mycloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/mycloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/mycloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php","Line":83,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'owncloud.oc_sensorlogger_devices' doesn't exist","Code":"42S02","Trace":[{"file":"/var/www/mycloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php","line":78,"function":"query","class":"PDO","type":"->"},{"file":"/var/www/mycloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":911,"function":"query","class":"Doctrine\\DBAL\\Driver\\PDOConnection","type":"->"},{"file":"/var/www/mycloud/lib/private/DB/Connection.php","line":202,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/mycloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":206,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/mycloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":217,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/mycloud/apps/sensorlogger/lib/Devices.php","line":41,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/mycloud/apps/sensorlogger/controller/sensorloggercontroller.php","line":355,"function":"getDevices","class":"OCA\\SensorLogger\\Devices","type":"::"},{"file":"/var/www/mycloud/apps/sensorlogger/controller/sensorloggercontroller.php","line":148,"function":"getWidgets","class":"OCA\\SensorLogger\\Controller\\SensorLoggerController","type":"->"},{"file":"/var/www/mycloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"index","class":"OCA\\SensorLogger\\Controller\\SensorLoggerController","type":"->"},{"file":"/var/www/mycloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/mycloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/mycloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/mycloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/mycloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/mycloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php","Line":78}},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0","version":"20.0.2.2"}
hi @mfg92
Base table or view not found: 1146 Table 'owncloud.oc_sensorlogger_devices' doesn't exist
indicates that something went wrong while install.
Try reinstall, and please report. You may find more details on sensorlogger errors in nextcloud.log
Thank you for answering. I tried the following:
> php occ app:remove sensorlogger
sensorlogger disabled
sensorlogger 0 removed
> php occ app:install sensorlogger
Error: App "Sensorlogger" cannot be installed because the following dependencies are not fulfilled: PHP with a version lower than 7.3 is required.
> nano apps/sensorlogger/appinfo/info.xml
(change max-version to 7.4)
> php occ app:install sensorlogger
sensorlogger already installed
> php occ app:enable sensorlogger
sensorlogger 0.1.3 enabled
Seems like no installation routine was trigger. It still does not work (same error as before).
Thanx 4 your effort. I hope I can find what causes this problem to fix it asap.
@mfg92 DB install/migration should be done automatically by nc. But you may give console command a try. https://docs.nextcloud.com/server/18/developer_manual/app/tutorial.html
@mfg92 Sorry but described behavior NOT reproducible Ubuntu 18.04.4 Nextcloud 20.0.1 SensorLogger 0.1.3 (installed from Apps) PHP 7.3.24 (Apache2 Module) Please check your PHP Version again!
If you have PHP 7.3
available there is no need to modify info.xml
at all.
Btw. SensorLogger 0.1.3 should work using PHP 7.4
too if you modify info.xml
@alexstocker I am running this with 0.1.4nc branch on PHP 7.4.25 without problems. Since you increased max PHP version to 8.0 in latest info.xml you may ask @AlwinAntreich or consider to close the issue as solved.