Calendar and Contacts not working


#1

Contact : Something went wrong, please try again later

and Calendar showing : undefined

In /var/log/openpaas/davserver/error.log
Stack trace:
#0 /usr/share/openpaas-davserver/esn.php(33): MongoDB\Client->__construct(‘mongodb://local…’, Array)
#1 {main}
thrown in /usr/share/openpaas-davserver/vendor/mongodb/mongodb/src/Client.php on line 87" while reading response header from upstream, client: 127.0.0.1, server: dav.openpaas.local, request: “GET /addressbooks/5c5e85e5c4c1b002eeedd3b9.json?personal=true&subscribed=true&shared=true&inviteStatus=2 HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php7.0-fpm.sock:”, host: “dav.openpaas.local:80”
2019/02/09 03:48:12 [error] 20692#20692: *873 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Class ‘MongoDB\Driver\Manager’ not found in /usr/share/openpaas-davserver/vendor/mongodb/mongodb/src/Client.php:87
Stack trace:
#0 /usr/share/openpaas-davserver/esn.php(33): MongoDB\Client->__construct(‘mongodb://local…’, Array)
#1 {main}
thrown in /usr/share/openpaas-davserver/vendor/mongodb/mongodb/src/Client.php on line 87” while reading response header from upstream, client: 127.0.0.1, server: dav.openpaas.local, request: “GET /addressbooks/5c5e85e5c4c1b002eeedd3b9.json?personal=true&subscribed=true&shared=true&inviteStatus=2 HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php7.0-fpm.sock:”, host: “dav.openpaas.local:80”

I installed
apt-get install php7.0-xml php-mongodb php-mongo

Am i missing something?

Thanks,
Daniel


#2

hello @binoyda,
Thanks to use Openpaas.

Can you please try this command php --ini and display it here

Thanks,
Aymane.


#3

Hi AymaneKhouaji, please find php --ini details.
Thanks,

~# php --ini
Configuration File (php.ini) Path: /etc/php/7.0/cli
Loaded Configuration File: /etc/php/7.0/cli/php.ini
Scan for additional .ini files in: /etc/php/7.0/cli/conf.d
Additional .ini files parsed: /etc/php/7.0/cli/conf.d/10-opcache.ini,
/etc/php/7.0/cli/conf.d/10-pdo.ini,
/etc/php/7.0/cli/conf.d/15-xml.ini,
/etc/php/7.0/cli/conf.d/20-bcmath.ini,
/etc/php/7.0/cli/conf.d/20-calendar.ini,
/etc/php/7.0/cli/conf.d/20-ctype.ini,
/etc/php/7.0/cli/conf.d/20-curl.ini,
/etc/php/7.0/cli/conf.d/20-dom.ini,
/etc/php/7.0/cli/conf.d/20-exif.ini,
/etc/php/7.0/cli/conf.d/20-fileinfo.ini,
/etc/php/7.0/cli/conf.d/20-ftp.ini,
/etc/php/7.0/cli/conf.d/20-gettext.ini,
/etc/php/7.0/cli/conf.d/20-iconv.ini,
/etc/php/7.0/cli/conf.d/20-json.ini,
/etc/php/7.0/cli/conf.d/20-mbstring.ini,
/etc/php/7.0/cli/conf.d/20-mongodb.ini,
/etc/php/7.0/cli/conf.d/20-phar.ini,
/etc/php/7.0/cli/conf.d/20-posix.ini,
/etc/php/7.0/cli/conf.d/20-readline.ini,
/etc/php/7.0/cli/conf.d/20-shmop.ini,
/etc/php/7.0/cli/conf.d/20-simplexml.ini,
/etc/php/7.0/cli/conf.d/20-sockets.ini,
/etc/php/7.0/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.0/cli/conf.d/20-sysvsem.ini,
/etc/php/7.0/cli/conf.d/20-sysvshm.ini,
/etc/php/7.0/cli/conf.d/20-tokenizer.ini,
/etc/php/7.0/cli/conf.d/20-wddx.ini,
/etc/php/7.0/cli/conf.d/20-xmlreader.ini,
/etc/php/7.0/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.0/cli/conf.d/20-xsl.ini

root@


#4

Hi,

Thanks it seems to be correct,
can you just verify if the 20-mongodb.ini have extension=mongodb.so and not extension=mongo.so

mongo.so is the old version of the mongo driver for php.

Aymane Khouaji.


#5

Hi,
It showing as

cat /etc/php/7.0/cli/conf.d/20-mongodb.ini
extension=mongodb.so

What else might be wrong?
Thanks,
Daniel


#6

In our server mails are working fine, able to send mail to external emails and receive too…
Server installed with our own domain name. we used following naming models. Is the names causing the dav and calendar issues?

james.domainname.com
dav.domainname.com
domainname.com

Thanks,
Daniel


#7

No i don’t think it’s related if you configured correctly your apache or nginx.
Sorry can you please (i know i demand you a lot of command :stuck_out_tongue:) do a php --ri mongodb
and php --ri mongo to see which driver is enabled.

Thanks,
Aymane.


#8

Hi,
Please find the result as requested.
%# php --ri mongodb

mongodb

MongoDB support => enabled
MongoDB extension version => 1.5.3
MongoDB extension stability => stable
libbson bundled version => 1.13.0
libmongoc bundled version => 1.13.0
libmongoc SSL => enabled
libmongoc SSL library => OpenSSL
libmongoc crypto => enabled
libmongoc crypto library => libcrypto
libmongoc crypto system profile => disabled
libmongoc SASL => enabled
libmongoc ICU => disabled
libmongoc compression => enabled
libmongoc compression snappy => disabled
libmongoc compression zlib => enabled

Directive => Local Value => Master Value
mongodb.debug => no value => no value

##############

%# php --ri mongo
Extension ‘mongo’ not present.

###############
In server i found following packages installed
~# dpkg -l|grep php|grep mongo
ii php-mongo 1.6.16-1+0~20180910132804.4+stretch~1.gbp2d77c4 amd64 MongoDB database driver
ii php-mongodb 1.5.3-2+0~20181207132519.5+stretch~1.gbp43d844 amd64 MongoDB driver for PHP

Thanks,
Daniel


#10

Hello,

Ok, you have the correct php-mongodb with the correct extension enabled :thinking:,

Can you try to install to install the driver by pecl ? But i think it gonna say already installed , so maybe to reinstall the vendor directory on sabre by composer install ?

Thanks,
Aymane.


#11

Is it because php version?
debian/ubuntu use PHP5.x /6 whereas in Debian 9 it use PHP 7.x ?

Thanks
Daniel


#12

Problem got fixed
Removed php-mongo and reboot server

Thanks for all the help