Problem with Mapi extension for PHP7
I installed latest core package on Debian 9 including the MAPI package needed to run e.g. WebApp:
But this contains the mapi.so compiled against API=20151012, so my apache2 (running PHP 7.2) first could not find the extension:
PHP Warning: PHP Startup: Unable to load dynamic library 'mapi.so' (tried: /usr/lib/php/20170718/mapi.so (/usr/lib/php/20170718/mapi.so: cannot open shared object file: No such file or directory),
Then i copied the mapi.so from the PHP5 to the PHP7 extension path (/usr/lib/php/20170718/) but then Apache refuses to load the extension with the message:
PHP Warning: PHP Startup: mapi: Unable to initialize module\nModule compiled with module API=20151012\nPHP compiled with module API=20170718\nThese options need to match\n in Unknown on line 0
Has anybody an idea what i could have overseen here?
You can’t load phpmapi-libs built for PHP5 with PHP7.
In other words: PHP-API-versions of interpreter and extension-lib have to match.
Either switch to a supported PHP-version, or compile Kopano’s PHP-MAPI-extension from source-repo for your specific php-config.
Hi @koopmann ,
we are always building the php-mapi extension against the default php version of each distribution, therefore by not using the distribution default packages (you mention 7.2, but stretch is at 7.0) you cannot use our package.
if you want to run with php 7.2, you have to compile php-mapi yourself.
Thank you for the help!
I will try to switch to the default PHP 7.0, if thats not working i will try to compile myself, sorry to ask this noob things but is there any way only to compile this component or do i have to compile the whole kopano core?