Nextcloud ldap integration

NethServer Version: 7.3.161
Module: nextcloud

I just created my first test user in nethserver, tried to login in nextcloud with that user with no luck.
After checking ldap settings with

sudo -u apache /usr/bin/php /usr/share/nextcloud/occ ldap:show-config

I get

[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the “ldap” namespace.

Is there no ldap integration in nextcloud?

Regards,
Joachim

Yes, there is. But probably the wrong nextcloud version has been installed due to a recent conflict.

Please, to confirm that’s the case take a look at:

Forgot to mention there is a Nextcloud 11 package in testing. If you want to lend a hand and give it a try you’ll be more than welcome :slight_smile:

I just installed (no upgrade) nextcloud 11.0.2.
So far I noticed no problems except one:

I use the news app. When I tried to activate the app I got an error. After a second try install.
I then downloaded nextcloud-news-updater and tried to install but the problem was that python3 is missing. I installed python34 and python34-setuptools. After that the updater failed because of an old php version 5.4 and nextcloud needs 5.6.x but when I check the version with phpversion() from an php-file within the webspace of nextcloud it tells me I have version 5.6.x.
I then linked /usr/bin/php to /usr/bin/php56 the updater worked.

Regards,
Joachim

1 Like

The PHP-Problem seems to be a more central bug.
I just looked in my mails and found a lot of messages from nextcloud cron job saying:

This version of Nextcloud requires at least PHP 5.6.0
You are currently running 5.4.16. Please update your PHP version.

After relinking to php56 the error is gone.

Thanks a bunch!
Can you share the output of:

rpm -qa *nextcloud* nethserver-rh-php*

cc/ @giacomo

Here it is:

nethserver-nextcloud-1.0.4-1.6.gbc8a610.ns7.noarch
nextcloud-11.0.2-1.ns7.noarch
nethserver-rh-php56-php-fpm-0.0.1-1.2.g73acebd.ns7.noarch

Please see the app manual to know if all requirements are met.

If you want to use PHP 5.6 from the system, you need, you must enable the SCL environment.

Please don’t do that! You need the full stack of PHP, not just he main executable.

Could please point me to the cron job? We can try to fix it.

1 Like

@giacomo

All requirements are met, I checked them

I installed nethserver-phpsettings-1.1.1-2.ns7.sdl.noarch and Php56 SCL Version is selected as default but /usr/bin/php still is the 5.4 version. And that´s the reason why the nextcloud-news-updater fails with:

sudo -u apache /usr/bin/nextcloud-news-updater -c /etc/nextcloud/news/updater.ini
2017-03-23 17:18:25,326 - Nextcloud News Updater - INFO - Running update in an interval of 900 seconds using 10 threads
2017-03-23 17:18:25,326 - Nextcloud News Updater - INFO - Running before update command: php -f /usr/share/nextcloud/occ -c /opt/remi/php56/root/etc/php.ini news:updater:before-update
2017-03-23 17:18:25,419 - Nextcloud News Updater - INFO - Running get all feeds command: php -f /usr/share/nextcloud/occ -c /opt/remi/php56/root/etc/php.ini news:updater:all-feeds
2017-03-23 17:18:25,419 - Nextcloud News Updater - INFO - Received these feeds to update: This version of Nextcloud requires at least PHP 5.6.0
You are currently running 5.4.16. Please update your PHP version.
2017-03-23 17:18:25,420 - Nextcloud News Updater - ERROR - Could not parse given JSON: This version of Nextcloud requires at least PHP 5.6.0
You are currently running 5.4.16. Please update your PHP version.: Trying again in 30 seconds
Traceback (most recent call last):
File “/usr/lib/python3.4/site-packages/nextcloud_news_updater-9.0.3-py3.4.egg/nextcloud_news_updater/api/api.py”, line 21, in parse_feed
feed_json = json.loads(json_string)
File “/usr/lib64/python3.4/json/init.py”, line 318, in loads
return _default_decoder.decode(s)
File “/usr/lib64/python3.4/json/decoder.py”, line 343, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib64/python3.4/json/decoder.py”, line 361, in raw_decode
raise ValueError(errmsg(“Expecting value”, s, err.value)) from None
ValueError: Expecting value: line 1 column 1 (char 0)

I tries to disable the news apps cron via ini-file setting useCronUpdates = false in /var/lib/nethserver/nextcloud/news/config/config.ini but the error still appears … It tries to run "php -f /usr/share/nextcloud/cron.php"and the error in mail is:

“This version of Nextcloud requires at least PHP 5.6.0
You are currently running 5.4.16. Please update your PHP version.”

Nextcloud 11 cron still uses the old php-version…

I found some php error in /var/log/messages:


Mar 23 19:31:13 nethserver7 php: PHP Warning: PHP Startup: Unable to load dynamic library ‘/opt/remi/php56/root/usr/lib64/php/modules/memcached.so’ - /opt/remi/php56/root/usr/lib64/php/modules/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0

and other *.so files are also missing

You don’t need it since nethserver-nextcloud already provides it.
Please, see official documentation to know how it works:
https://www.softwarecollections.org/en/scls/rhscl/rh-php56/

See above doc, but basically you need to do something like:

scl enable rh-php56 bash
php -f /usr/share/nextcloud/cron.php

I solved to problem with the help of @giacomo
I installed Nextcloud 11 testing package.

The problem with news updater and php was solved by changing the cron job for apache user.
The execution command is now /opt/rh/rh-php56/root/usr/bin/php -f /usr/share/nextcloud/cron.php

I don´t need nextcloud-news-updater anymore. The nextcloud cron updates news perfectly.

So far I encountered no more problems with nextcloud 11.

Thank´s everybody

1 Like