mapi.so not loaded (php7-mapi)
-
Hi all,
just upgraded kopano core and kopano-webapp and now cannot load kopano-webapp any more. Obviously the MAPI connector is broken and I do not understand why. I cross-checked with phpmapi() and indeed there is no MAPI.SO loaded in my php7-fpm setup.
First off, here the installed packages on my GNU/Linux Debian Stretch OS
dpkg -l |grep -E ‘kopano|php|mapi’ |gawk ‘{print $2"\t\t"$3}’
kopano-backup 8.7.81.164.02d8c6ffb-0+264.1 kopano-bash-completion 8.7.81.164.02d8c6ffb-0+262.1 kopano-client 8.7.81.164.02d8c6ffb-0+262.1 kopano-common 8.7.81.164.02d8c6ffb-0+262.1 kopano-contacts 8.7.81.164.02d8c6ffb-0+262.1 kopano-dagent 8.7.81.164.02d8c6ffb-0+262.1 kopano-gateway 8.7.81.164.02d8c6ffb-0+262.1 kopano-ical 8.7.81.164.02d8c6ffb-0+262.1 kopano-lang 8.7.81.164.02d8c6ffb-0+262.1 kopano-migration-pst 8.7.81.164.02d8c6ffb-0+264.1 kopano-monitor 8.7.81.164.02d8c6ffb-0+262.1 kopano-python-utils 8.7.81.164.02d8c6ffb-0+264.1 kopano-python3-extras 0.1.2+0-0+53.2 kopano-search 8.7.81.164.02d8c6ffb-0+264.1 kopano-server 8.7.81.164.02d8c6ffb-0+262.1 kopano-spamd 8.7.81.164.02d8c6ffb-0+264.1 kopano-spooler 8.7.81.164.02d8c6ffb-0+262.1 kopano-statsd 8.7.81.164.02d8c6ffb-0+262.1 kopano-utils 8.7.81.164.02d8c6ffb-0+262.1 libgsoap-kopano-2.8.62 2.8.62-0+1.2 libgsoap-kopano-2.8.84 2.8.84-0+3.1 libkcicalmapi0 8.7.81.164.02d8c6ffb-0+262.1 libkcinetmapi0 8.7.81.164.02d8c6ffb-0+262.1 libkcmapi0 8.6.80.493-0+50.1 libmapi1 8.7.81.164.02d8c6ffb-0+262.1 libvmime-kopano1 0.9.2+14.2 libvmime-kopano2 0.9.2.85+6.1 php 1:7.0+49 php-cli 1:7.0+49 php-common 1:49 php-gettext 1.0.12-0.1 php-mbstring 1:7.0+49 php-pear 1:1.10.1+submodules+notgz-9+deb9u1 php-php-gettext 1.0.12-0.1 php-soap 1:7.0+49 php-xml 1:7.0+49 php7-mapi 8.7.81.164.02d8c6ffb-0+262.1 php7.0 7.0.33-0+deb9u3 php7.0-cli 7.0.33-0+deb9u3 php7.0-common 7.0.33-0+deb9u3 php7.0-curl 7.0.33-0+deb9u3 php7.0-enchant 7.0.33-0+deb9u3 php7.0-fpm 7.0.33-0+deb9u3 php7.0-json 7.0.33-0+deb9u3 php7.0-mbstring 7.0.33-0+deb9u3 php7.0-opcache 7.0.33-0+deb9u3 php7.0-readline 7.0.33-0+deb9u3 php7.0-soap 7.0.33-0+deb9u3 php7.0-xml 7.0.33-0+deb9u3 php7.0-zip 7.0.33-0+deb9u3 python3-kopano 8.7.81.164.02d8c6ffb-0+264.1 python3-kopano-search 8.7.81.164.02d8c6ffb-0+264.1 python3-kopano-utils 8.7.81.164.02d8c6ffb-0+264.1 python3-mapi 8.7.81.164.02d8c6ffb-0+262.1 z-push-backend-kopano 2.5.0+0-0
clear && cd /etc/php/7.0/fpm/conf.d && ls -lh && cat 20-kopano.ini
lrwxrwxrwx 1 root root 39 Apr 5 2018 10-opcache.ini -> /etc/php/7.0/mods-available/opcache.ini lrwxrwxrwx 1 root root 35 Apr 5 2018 10-pdo.ini -> /etc/php/7.0/mods-available/pdo.ini lrwxrwxrwx 1 root root 35 Apr 5 2018 15-xml.ini -> /etc/php/7.0/mods-available/xml.ini lrwxrwxrwx 1 root root 40 Apr 5 2018 20-calendar.ini -> /etc/php/7.0/mods-available/calendar.ini lrwxrwxrwx 1 root root 37 Apr 5 2018 20-ctype.ini -> /etc/php/7.0/mods-available/ctype.ini lrwxrwxrwx 1 root root 36 Apr 23 2018 20-curl.ini -> /etc/php/7.0/mods-available/curl.ini lrwxrwxrwx 1 root root 35 Apr 5 2018 20-dom.ini -> /etc/php/7.0/mods-available/dom.ini lrwxrwxrwx 1 root root 39 Jun 24 12:43 20-enchant.ini -> /etc/php/7.0/mods-available/enchant.ini lrwxrwxrwx 1 root root 36 Apr 5 2018 20-exif.ini -> /etc/php/7.0/mods-available/exif.ini lrwxrwxrwx 1 root root 40 Apr 5 2018 20-fileinfo.ini -> /etc/php/7.0/mods-available/fileinfo.ini lrwxrwxrwx 1 root root 35 Apr 5 2018 20-ftp.ini -> /etc/php/7.0/mods-available/ftp.ini lrwxrwxrwx 1 root root 39 Apr 5 2018 20-gettext.ini -> /etc/php/7.0/mods-available/gettext.ini lrwxrwxrwx 1 root root 37 Apr 5 2018 20-iconv.ini -> /etc/php/7.0/mods-available/iconv.ini lrwxrwxrwx 1 root root 36 Apr 5 2018 20-json.ini -> /etc/php/7.0/mods-available/json.ini lrwxrwxrwx 1 root root 38 Jun 24 14:50 20-kopano.ini -> /etc/php/7.0/mods-available/kopano.ini lrwxrwxrwx 1 root root 40 Apr 5 2018 20-mbstring.ini -> /etc/php/7.0/mods-available/mbstring.ini lrwxrwxrwx 1 root root 36 Apr 5 2018 20-phar.ini -> /etc/php/7.0/mods-available/phar.ini lrwxrwxrwx 1 root root 37 Apr 5 2018 20-posix.ini -> /etc/php/7.0/mods-available/posix.ini lrwxrwxrwx 1 root root 40 Apr 5 2018 20-readline.ini -> /etc/php/7.0/mods-available/readline.ini lrwxrwxrwx 1 root root 37 Apr 5 2018 20-shmop.ini -> /etc/php/7.0/mods-available/shmop.ini lrwxrwxrwx 1 root root 41 Apr 5 2018 20-simplexml.ini -> /etc/php/7.0/mods-available/simplexml.ini lrwxrwxrwx 1 root root 36 Apr 5 2018 20-soap.ini -> /etc/php/7.0/mods-available/soap.ini lrwxrwxrwx 1 root root 39 Apr 5 2018 20-sockets.ini -> /etc/php/7.0/mods-available/sockets.ini lrwxrwxrwx 1 root root 39 Apr 5 2018 20-sysvmsg.ini -> /etc/php/7.0/mods-available/sysvmsg.ini lrwxrwxrwx 1 root root 39 Apr 5 2018 20-sysvsem.ini -> /etc/php/7.0/mods-available/sysvsem.ini lrwxrwxrwx 1 root root 39 Apr 5 2018 20-sysvshm.ini -> /etc/php/7.0/mods-available/sysvshm.ini lrwxrwxrwx 1 root root 41 Apr 5 2018 20-tokenizer.ini -> /etc/php/7.0/mods-available/tokenizer.ini lrwxrwxrwx 1 root root 36 Apr 5 2018 20-wddx.ini -> /etc/php/7.0/mods-available/wddx.ini lrwxrwxrwx 1 root root 41 Apr 5 2018 20-xmlreader.ini -> /etc/php/7.0/mods-available/xmlreader.ini lrwxrwxrwx 1 root root 41 Apr 5 2018 20-xmlwriter.ini -> /etc/php/7.0/mods-available/xmlwriter.ini lrwxrwxrwx 1 root root 35 Apr 5 2018 20-xsl.ini -> /etc/php/7.0/mods-available/xsl.ini lrwxrwxrwx 1 root root 35 Apr 5 2018 20-zip.ini -> /etc/php/7.0/mods-available/zip.ini ; Enable MAPI extension module extension=mapi.so ; Adding path with php mapi classes to include dir include_path="${include_path}:/usr/share/kopano/php"
I compared with another installation where php5 is used. The mapi classes normally reside under /usr/share/kopano/php/mapi and on the working system with php5 used it looks like that:
-rw-r--r-- 1 root root 4029 Mai 17 2018 class.baseexception.php -rw-r--r-- 1 root root 62686 Mai 17 2018 class.baserecurrence.php -rw-r--r-- 1 root root 9748 Mai 17 2018 class.freebusypublish.php -rw-r--r-- 1 root root 2687 Mai 17 2018 class.mapiexception.php -rw-r--r-- 1 root root 130528 Mai 17 2018 class.meetingrequest.php -rw-r--r-- 1 root root 63569 Mai 17 2018 class.recurrence.php -rw-r--r-- 1 root root 17029 Mai 17 2018 class.taskrecurrence.php -rw-r--r-- 1 root root 39877 Mai 17 2018 class.taskrequest.php -rw-r--r-- 1 root root 10360 Mai 17 2018 mapicode.php -rw-r--r-- 1 root root 35690 Mai 17 2018 mapidefs.php -rw-r--r-- 1 root root 2679 Mai 17 2018 mapiguid.php -rw-r--r-- 1 root root 153 Mai 17 2018 mapi.ini -rw-r--r-- 1 root root 62174 Mai 17 2018 mapitags.php -rw-r--r-- 1 root root 11515 Mai 17 2018 mapi.util.php
However on my problem host were the issue occured I only have one mapi.ini Where are the classes, is that the reason for that culprit?!
# ls -lh /usr/share/kopano/php/mapi insgesamt 4,0K -rw-r--r-- 1 root root 153 Jun 19 10:55 mapi.ini
EDIT: just checked the contents of the file php7-mapi_8.6.80.493-0+50.1_amd64.deb of former version I used and compared to the latest php7-mapi_8.7.81.164.02d8c6ffb-0+262.1_amd64.deb offered on kopano-core 8.7.81.164. Indeed, it seems there are missing the files. What’s going on here?
# dpkg -c php7-mapi_8.6.80.493-0+50.1_amd64.deb drwxr-xr-x root/root 0 2018-04-05 00:46 ./ drwxr-xr-x root/root 0 2018-04-05 00:46 ./usr/ drwxr-xr-x root/root 0 2018-04-05 00:46 ./usr/lib/ drwxr-xr-x root/root 0 2018-04-05 00:46 ./usr/lib/php/ drwxr-xr-x root/root 0 2018-04-05 00:46 ./usr/lib/php/20151012/ -rw-r--r-- root/root 328448 2018-04-05 00:46 ./usr/lib/php/20151012/mapi.so drwxr-xr-x root/root 0 2018-04-05 00:46 ./usr/share/ drwxr-xr-x root/root 0 2018-04-05 00:46 ./usr/share/doc/ drwxr-xr-x root/root 0 2018-04-05 00:46 ./usr/share/doc/php7-mapi/ -rw-r--r-- root/root 223 2018-04-05 00:46 ./usr/share/doc/php7-mapi/changelog.Debian.gz -rw-r--r-- root/root 34520 2018-04-05 00:46 ./usr/share/doc/php7-mapi/copyright drwxr-xr-x root/root 0 2018-04-05 00:46 ./usr/share/kopano/ drwxr-xr-x root/root 0 2018-04-05 00:46 ./usr/share/kopano/php/ drwxr-xr-x root/root 0 2018-04-05 00:46 ./usr/share/kopano/php/mapi/ -rw-r--r-- root/root 4029 2018-04-05 00:46 ./usr/share/kopano/php/mapi/class.baseexception.php -rw-r--r-- root/root 62686 2018-04-05 00:46 ./usr/share/kopano/php/mapi/class.baserecurrence.php -rw-r--r-- root/root 9748 2018-04-05 00:46 ./usr/share/kopano/php/mapi/class.freebusypublish.php -rw-r--r-- root/root 2687 2018-04-05 00:46 ./usr/share/kopano/php/mapi/class.mapiexception.php -rw-r--r-- root/root 130528 2018-04-05 00:46 ./usr/share/kopano/php/mapi/class.meetingrequest.php -rw-r--r-- root/root 63569 2018-04-05 00:46 ./usr/share/kopano/php/mapi/class.recurrence.php -rw-r--r-- root/root 17029 2018-04-05 00:46 ./usr/share/kopano/php/mapi/class.taskrecurrence.php -rw-r--r-- root/root 39877 2018-04-05 00:46 ./usr/share/kopano/php/mapi/class.taskrequest.php -rw-r--r-- root/root 153 2018-04-05 00:46 ./usr/share/kopano/php/mapi/mapi.ini -rw-r--r-- root/root 11515 2018-04-05 00:46 ./usr/share/kopano/php/mapi/mapi.util.php -rw-r--r-- root/root 10360 2018-04-05 00:46 ./usr/share/kopano/php/mapi/mapicode.php -rw-r--r-- root/root 35690 2018-04-05 00:46 ./usr/share/kopano/php/mapi/mapidefs.php -rw-r--r-- root/root 2679 2018-04-05 00:46 ./usr/share/kopano/php/mapi/mapiguid.php -rw-r--r-- root/root 62103 2018-04-05 00:46 ./usr/share/kopano/php/mapi/mapitags.php
# dpkg -c php7-mapi_8.7.81.164.02d8c6ffb-0+262.1_amd64.deb drwxr-xr-x root/root 0 2019-06-19 10:55 ./ drwxr-xr-x root/root 0 2019-06-19 10:55 ./usr/ drwxr-xr-x root/root 0 2019-06-19 10:55 ./usr/lib/ drwxr-xr-x root/root 0 2019-06-19 10:55 ./usr/lib/php/ drwxr-xr-x root/root 0 2019-06-19 10:55 ./usr/lib/php/20151012/ -rw-r--r-- root/root 357120 2019-06-19 10:55 ./usr/lib/php/20151012/mapi.so drwxr-xr-x root/root 0 2019-06-19 10:55 ./usr/share/ drwxr-xr-x root/root 0 2019-06-19 10:55 ./usr/share/doc/ drwxr-xr-x root/root 0 2019-06-19 10:55 ./usr/share/doc/php7-mapi/ -rw-r--r-- root/root 230 2019-06-19 10:55 ./usr/share/doc/php7-mapi/changelog.Debian.gz -rw-r--r-- root/root 34520 2019-06-19 10:55 ./usr/share/doc/php7-mapi/copyright drwxr-xr-x root/root 0 2019-06-19 10:55 ./usr/share/kopano/ drwxr-xr-x root/root 0 2019-06-19 10:55 ./usr/share/kopano/php/ drwxr-xr-x root/root 0 2019-06-19 10:55 ./usr/share/kopano/php/mapi/ -rw-r--r-- root/root 153 2019-06-19 10:55 ./usr/share/kopano/php/mapi/mapi.ini
I tried extracting those missing .php class files from the former php7-mapi .deb package and copied them into /usr/share/kopano/php/mapi but it didn’t solve the issue after restarting php7-fpm and apache2. The mapi.so still is not loaded and shown in phpinfo. Logfile of php7-fpm also isn’t showing any helpful hints.
Any help appreciated. Thank you
-
Just did an upgrade , and I might have had similar issues, have a look, and make sure that the php5-mapi stuff is not only removed from the server, but also purged. Then have a look at this https://kb.kopano.io/display/TS/PHP+mapi+extension+not+found
-
Hi @micro,
@micro said in mapi.so not loaded (php7-mapi):
Where are the classes, is that the reason for that culprit?!
The php classes have been removed a while ago as these were essentially duplicated over our stack. WebApp brings their own classes, Z-Push brings their own classes.
This should not impact the mapi module in php itself, though.
-
@klausade: look at my initial post. There is nothing like php5* installed on my system. Also the link is known to me but not helpful. As you see in my posting this is not the issue as the module is integrated correctly and loaded by apache2/php7-fpm (see the provided screenshot, too)
@fbartels: thanks for clarification. Any clues what else to try? I am puzzled and tried a lot, without success. What’s missing here?
-
removed packages and installed them new. Now it works. However, what a pity not to have found the real reason. :(
-
@micro said in mapi.so not loaded (php7-mapi):
As you see in my posting this is not the issue as the module is integrated correctly and loaded by apache2/php7-fpm (see the provided screenshot, too)
Actually, the screenshot shows kopano.ini configuration was parsed.
This does not necessarily mean that corresponding code-modules were loaded sucessfully, too.
Such failures (e.g. outdated dependencies ofmapi.so
should go the php-fpm-error log.
++umgfoin.