PHP Startup: Unable to load dynamic library

hi @all,

i’m a newbie, installed yesterday core-8.6.80.1018_0+152-Ubuntu_16.04-amd64+webapp-3.4.16.1544+881-Ubuntu_16.04-all under plesk 18.8 and have the same problem:

PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20151012/mapi.so’ - /usr/lib/libkcinetmapi.so.0: undefined symbol: _ZNK5vmime7message8generateB5cxx11Emm in Unknown on line 0

kind regards,
andreas

@omoc I have moved your question into a dedicated topic, please create a new topic if you have questions that are not directly related to the existing topic (you are using a different os and get an error on a completely different area).

back to topic:

Can you post the output of dpkg -l | grep 'libkc\|kopano'?

@fbartels : ah, okay. thx!

ii kopano-backup 8.6.80.1018-0+152.1 amd64 Utility to back up and restore Kopano stores
ii kopano-client 8.6.80.1018-0+152.1 amd64 Kopano MAPI provider library
ii kopano-common 8.6.80.1018-0+152.1 amd64 Shared files for Kopano Core services.
ii kopano-contacts 8.6.80.1018-0+152.1 amd64 MAPI provider adding contact folders in the addressbook
ii kopano-dagent 8.6.80.1018-0+152.1 amd64 E-Mail Delivery Agent for Kopano Core
ii kopano-gateway 8.6.80.1018-0+152.1 amd64 POP3 and IMAP Gateway for Kopano Core
ii kopano-ical 8.6.80.1018-0+152.1 amd64 ICal and CalDAV Gateway for Kopano Core
ii kopano-lang 8.6.80.988-0+141.1 all Translations for Kopano Core components
ii kopano-monitor 8.6.80.1018-0+152.1 amd64 Quota Monitor for Kopano Core
ii kopano-search 8.6.80.1018-0+152.1 amd64 Indexed search engine for Kopano Core
ii kopano-server 8.6.80.1018-0+152.1 amd64 Server component for Kopano Core
ii kopano-server-packages 8.6.80.1018-0+152.1 all Metapackage to install the entire Kopano Core stack
ii kopano-spooler 8.6.80.1018-0+152.1 amd64 E-mail Spooler for Kopano Core
ii kopano-utils 8.6.80.1018-0+152.1 amd64 Admin command-line utils for Kopano Core
ii kopano-webapp 3.4.16.1544+881.1 all New and improved WebApp for Kopano
ii libgsoap-kopano-2.8.62 2.8.62-0+1.1 amd64 Runtime libraries for gSOAP
ii libkcarchiver0 8.6.80.1018-0+152.1 amd64 Library with shared Kopano archiver functionality
ii libkcarchivercore0 8.6.80.1018-0+152.1 amd64 Library with shared Kopano archiver functionality
ii libkcfreebusy0 8.6.80.1018-0+152.1 amd64 Implementation of Free/Busy time scheduling
ii libkcicalmapi0 8.6.80.1018-0+152.1 amd64 iCal interface for MAPI
ii libkcinetmapi0 8.6.80.1018-0+152.1 amd64 Interface between internet e-mail and MAPI
ii libkcoidc0 0.3.0-0+17.1 amd64 Kopano OpenID Connect Library
ii libkcrosie0 8.6.80.1018-0+152.1 amd64 Kopano HTML sanitizer interface
ii libkcserver0 8.6.80.1018-0+152.1 amd64 The Kopano Server library
ii libkcsoap0 8.6.80.1018-0+152.1 amd64 SOAP (de)serializer functions for Kopano’s RPCs
ii libkcutil0 8.6.80.1018-0+152.1 amd64 Miscellaneous utility functions for Kopano Core
ii libvmime-kopano1 0.9.2+14.1 amd64 a C++ mail library (runtime library)
ii python-kopano 8.6.80.1018-0+152.1 all High-level Python 2 bindings for Kopano

hm… no that does not too unusual. Does Plesk bring its own version of php? I’d recommend to try another setup on a blank box without Plesk (otherwise you need to configure around Plesk anyhow).

… yes, Plesk install his own PHP-Version. I tried to install the mapi.so under this version, but it failed. All my server have a installed Plesk and i read about people they have installed kopano/zarafa under plesk. Maybe i have to recompile the sourcecode. I don’t know … i think there are many admins they wan’t to install a “cool” webapp like kopana under plesk, because horde under plesk is … without words …

@omoc said in PHP Startup: Unable to load dynamic library:

Plesk install his own PHP-Version

Ok, then this is the source of your error. If you want to run Kopano with a different PHP version you have to compile php-mapi indeed yourself.

… but the kopano.ini not listed in the plesk php-configuration. it seems that kopano use his own php because i get no “no mapi.so found” - error, but a “mapi.so found, but not correct” ;) to use the mapi.so in the plesk php i have to installed this into a different location. so, my opionion, everything looks fine, but the mapi.so is broken

… this is the error-message when i rename the /usr/lib/php/20151012/mapi.so into _mapi.so:

PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20151012/mapi.so’ - /usr/lib/php/20151012/mapi.so: cannot open shared object file: No such file or directory in Unknown on line 0

that the evidence that kopano use his own php-version ;)

Yes and no. We have to compile our php extension against a specified abi. For this we always choose the default php version for the given distribution. So as long as you use the default php of your os you are fine. If you want to use a different php version you have to compile php-mapi yourself.

I’d still recommend to setup kopano on a system without Plesk, though.

… okay, that isn’t practible, because for easy systemadminstration many server have a installed tool like plesk. there have to be a workaround. if i compile the mapi.so with using the plesk-php, i have to configurate kopano to use the plesk-php also. maybe found one who installed kopano under plesk. i will give you a feedback.

thx!

@omoc
Which Plesk-PHP-version did you enable for Webapp?
Plesk/Odin allows you to install arbitrary PHP-handlers in parallel: You can choose from Plesk-provided ones, the system-default PHP-handler or custom-installations/ PHP source-builds etc.

It’s definitely unnecessary to recompile php-mapi in order to run Webapp on a plesk/onyx administrated website.

Here you go:
How to install additional PHP-versions provided by Plesk
Adding custom PHP-handlers

++umgfoin.

… thank you very mutch! I think i have found the problem:

All my domains running under plesk php “7.0.30”, installed under /opt/plesk/php/7.0. BUT this is unnecessary. because this is not the version that kopano use under mydomain.tld/webapp! Kopano use the version “7.0.30-0ubuntu0.16.04.1” installed under /usr/lib… (a phpinfo() in config.php give me the info about the version, but not about the install-path). The problem is - the default version on command-line is 7.1.17 (php-i). So the mapi.so seems to be compiled under 7.1 and NOT 7.0.

So, the only what i have to do is to use the php 7.1 handler in the apache-conf for /webapp. i hope i will find this …

… hihihi … cool. That was the problem :) I desintalled every packages and changed the default PHP-Version with

sudo update-alternatives --config php

to PHP 7.0 and installed everything once again.

Kind regards,
Andreas

btw. i don’t know if kopano runs, but i see the login …

… after adding a MySql-User different from root-user kopano runs :) The thread can be closed …

Many THX,
Andreas