Clean UCS4.3 and Kopano install: PHP mapi extension not found

Hi There,

Still new to Univention. I’m getting the following error on a clean UCS 4.3 install with Kopano Core, WebApp and Z-push from the AppCenter:

Not Found: PHP mapi extension not found
If you have upgraded Kopano Core, please restart Apache

Kopano WebApp can’t start because of incompatible configuration.

Please correct above errors, a good start is by checking your ‘/etc/php5/apache2/php.ini’ file.

You can disable this configuration check by editing the file ‘/usr/share/kopano-webapp/config.php’, but this is not recommended.

Found some info here: https://kb.kopano.io/display/TS/PHP+mapi+extension+not+found
but there is no: /etc/php5/apache2/conf.d/ directory, so i’m wondering if the correct PHP packages have been installed:

root@ucs-02:~# dpkg -l | grep php
ii  libapache2-mod-php5                                 5.6.33+dfsg-0+deb8u1                             amd64        server-side, HTML-embedded scripting language (Apache 2 mo            dule)
ii  php-common                                          1:49                                             all          Common files for PHP packages
ii  php-gettext                                         1.0.12-0.1                                       all          transitional dummy package for php-php-gettext
ii  php-libsmbclient                                    0.5.0-30.4                                       amd64        libsmbclient-php is a PHP extension that uses Samba's libs            mbclient
ii  php-mbstring                                        1:7.0+49                                         all          MBSTRING module for PHP [default]
ii  php-pear                                            1:1.10.1+submodules+notgz-9                      all          PEAR Base System
ii  php-php-gettext                                     1.0.12-0.1                                       all          read gettext MO files directly, without requiring anything             other than PHP
ii  php-soap                                            1:7.0+49                                         all          SOAP module for PHP [default]
ii  php-xml                                             1:7.0+49                                         all          DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default            ]
ii  php-zip                                             1:7.0+49                                         all          Zip module for PHP [default]
ii  php5                                                5.6.33+dfsg-0+deb8u1                             all          server-side, HTML-embedded scripting language (metapackage            )
ii  php5-cli                                            5.6.33+dfsg-0+deb8u1                             amd64        command-line interpreter for the php5 scripting language
ii  php5-common                                         5.6.33+dfsg-0+deb8u1                             amd64        Common files for packages built from the php5 source
ii  php5-curl                                           5.6.33+dfsg-0+deb8u1                             amd64        CURL module for php5
ii  php5-enchant                                        5.6.33+dfsg-0+deb8u1                             amd64        Enchant module for php5
ii  php5-json                                           1.3.6-1                                          amd64        JSON module for php5
ii  php5-readline                                       5.6.33+dfsg-0+deb8u1                             amd64        Readline module for php5
ii  php7-mapi                                           8.4.5.0-0+33.2                                   amd64        PHP bindings for MAPI
ii  php7.0-cgi                                          7.0.27-0+deb9u1                                  amd64        server-side, HTML-embedded scripting language (CGI binary)
ii  php7.0-cli                                          7.0.27-0+deb9u1                                  amd64        command-line interpreter for the PHP scripting language
ii  php7.0-common                                       7.0.27-0+deb9u1                                  amd64        documentation, examples and common module for PHP
ii  php7.0-json                                         7.0.27-0+deb9u1                                  amd64        JSON module for PHP
ii  php7.0-mbstring                                     7.0.27-0+deb9u1                                  amd64        MBSTRING module for PHP
ii  php7.0-opcache                                      7.0.27-0+deb9u1                                  amd64        Zend OpCache module for PHP
ii  php7.0-readline                                     7.0.27-0+deb9u1                                  amd64        readline module for PHP
ii  php7.0-soap                                         7.0.27-0+deb9u1                                  amd64        SOAP module for PHP
ii  php7.0-xml                                          7.0.27-0+deb9u1                                  amd64        DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii  php7.0-zip                                          7.0.27-0+deb9u1                                  amd64        Zip module for PHP
ii  univention-saml-schema                              5.0.4-18A~4.3.0.201805071530                     all          UCS simpleSAMLphp ldap integration

Anyone with some insight on this?
Thanks.

Hi @jester,

Univention 4.3 uses php 7, therefore you should follow the remark “For PHP 7 use /etc/php/7.0/ instead of /etc/php5/”.

It’s strange though that you get this error. It’s a known issue that some WebApp packages install php5 dependencies, but so far WebApp has always worked.

Hi @fbartels,
Sorry, copy error. The line with ‘/etc/php5/apache2/conf.d/’ in my msg should have said:
‘/etc/php/7.0/apache2/conf.d/’ (… this is the directory that does not exists)

To be exact, i ran:

# mkdir -p /etc/php/7.0/apache2/conf.d/
# ln -s /etc/php/7.0/mods-available/kopano.ini /etc/php/7.0/apache2/conf.d/
# systemctl restart apache2

But the error persists.

Hi @jester,

looking back at your installed packages:

Your apache still uses php5 instead of php7. The first step would be to install libapache2-mod-php7.0, I’m not quite sure if other steps are neccesary to switch.

Hi @jester,

before you fix it manually, could you try if the problem auto corrects itself when upgrading the kopano4ucs-webapp package? For this you have to add the following line to /etc/apt/sources.list:

deb http://repo.z-hub.io/kopano4ucs/Univention_4.3/ /

The update then should trigger an updated join script call, which disables php5, enables php7 and restarts apache. I don’t think anything could break from using this package, but its of course always recommended to make a backup first.

@fbartels,
I probably won’t be near this machine today, will give it a shot tomorrow and report back.

Thanks!

Nope, it pulled some updates, but same error message.
Added the symlink to kopano.ini as well but to no avail.

@fbartels

Restored a snapshot of a clean UCS install. Installing Kopano core does not pull php5 packages, it does give some warnings, but they do not seem related to my problem:

6654 packages   18-06-05 20:40:08 [    INFO]: Module: kopano-cfg
6654 packages   18-06-05 20:40:08 [    INFO]: File: /etc/security/packetfilter.d/80_univention-firewall_policy.sh
6654 packages   18-06-05 20:40:12 [    INFO]: Unable to open Admin session: network error (0x80040115)
6654 packages   18-06-05 20:40:12 [    INFO]: The server is not running, or not accessible through "default:".
6654 packages   18-06-05 20:40:12 [    INFO]: Using the -v option (possibly multiple times) may give more hints.
6654 packages   18-06-05 20:40:12 [    INFO]: Warning: The postinst maintainerscript of the package kopano4ucs
6654 packages   18-06-05 20:40:12 [    INFO]: Warning: seems to use apt-key (provided by apt) without depending on gnupg or gnupg2.
6654 packages   18-06-05 20:40:12 [    INFO]: Warning: This will BREAK in the future and should be fixed by the package maintainer(s).
6654 packages   18-06-05 20:40:12 [    INFO]: Note: Check first if apt-key functionality is needed at all - it probably isn't!
6654 packages   18-06-05 20:40:12 [    INFO]: Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package kopano4ucs)

It is the Kopano Webapp package that wants to pull PHP5 dependencies:

Installation of Kopano WebApp

Please confirm to install the application Kopano WebApp on this host.
The following software changes on ucs-02 will be applied: 44 packages will be installed / upgraded

More information…
The following packages will be installed or upgraded:

  • libonig2
  • libaspell15
  • aspell
  • aspell-en
  • libenchant1c2a
  • enchant
  • php5-common
  • php5-json
  • php7.0-xml
  • php-xml
  • php-pear
  • php7.0-mbstring
  • php-mbstring
  • php-php-gettext
  • php-gettext
  • libzip4
  • php7.0-zip
  • php-zip
  • kopano-webapp
  • kopano-webapp-plugin-desktopnotifications
  • kopano-webapp-plugin-filepreviewer
  • php5-curl
  • kopano-webapp-plugin-files
  • kopano-webapp-plugin-filesbackend-owncloud
  • libqdbm14
  • php5-cli
  • libapache2-mod-php5
  • php5
  • php-libsmbclient
  • kopano-webapp-plugin-filesbackend-smb
  • kopano-webapp-plugin-folderwidgets
  • php7.0-soap
  • php-soap
  • kopano-webapp-plugin-mdm
  • kopano-webapp-plugin-smime
  • php5-enchant
  • kopano-webapp-plugin-spell
  • kopano-webapp-plugin-spell-de-de
  • kopano-webapp-plugin-spell-en
  • kopano-webapp-plugin-spell-nl
  • kopano-webapp-plugin-titlecounter
  • kopano-webapp-plugin-webappmanual
  • kopano4ucs-webapp
  • php5-readline

Aborted the Webapp install.

Added the z-hub.io repo to the sources.list and ran the Webapp install from the UCS WebGUI again. This results in an Error performing action message. The appcenter.log shows:

26942 actions.install    18-06-05 20:58:41 [   DEBUG]: Component kopano-webapp_20170530164135 registered
26942 actions.install    18-06-05 20:58:41 [   DEBUG]: Dry running with [u'kopano4ucs-webapp']
26942 packages           18-06-05 20:58:41 [   DEBUG]: Calling /usr/bin/apt-get -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-overwrite -o DPkg::Options::=--force-overwrite-dir --trivial-only=no --assume-yes --auto-remove install -s kopano4ucs-webapp
26942 packages           18-06-05 20:58:41 [    INFO]: Reading package lists...
26942 packages           18-06-05 20:58:41 [    INFO]: Building dependency tree...
26942 packages           18-06-05 20:58:41 [    INFO]: Reading state information...
26942 packages           18-06-05 20:58:41 [    INFO]: Some packages could not be installed. This may mean that you have
26942 packages           18-06-05 20:58:41 [    INFO]: requested an impossible situation or if you are using the unstable
26942 packages           18-06-05 20:58:41 [    INFO]: distribution that some required packages have not yet been created
26942 packages           18-06-05 20:58:41 [    INFO]: or been moved out of Incoming.
26942 packages           18-06-05 20:58:41 [    INFO]: The following information may help to resolve the situation:
26942 packages           18-06-05 20:58:41 [    INFO]:
26942 packages           18-06-05 20:58:41 [    INFO]: The following packages have unmet dependencies:
26942 packages           18-06-05 20:58:41 [    INFO]:  kopano4ucs-webapp : Depends: php-smbclient but it is not installable
26942 packages           18-06-05 20:58:41 [ WARNING]: E: Unable to correct problems, you have held broken packages.

Still got a snapshot of the state with PHP5 installed (before trying to fix things)… if necessary for testing.

I never said something else

That’s stange. Meanwhile I have uploaded the new package to the test appcenter. Here I don’t see these errors (some php5 packages are still installed, but the join script forces the use of php7).

So you could enable the test appcenter to see if that makes a difference for you. If it doesn’t I’d encourage you to get in contact with our support so someone can have a direct look at your system

This test UCS Kopano server is in the DMZ and is member server of a test AD Domain server in the LAN. No idea what the join-script does, but could this somehow be related to the way it is setup?
…just thinking out loud here.

Added the test app repo, it’s looking better (a lot less php5 dependencies):

Installation of Kopano WebApp

Please confirm to install the application Kopano WebApp on this host.
The following software changes on ucs-02 will be applied: 44 packages will be installed / upgraded

More information…
The following packages will be installed or upgraded:

  • libaspell15
  • aspell
  • aspell-en
  • libenchant1c2a
  • enchant
  • php7.0-xml
  • php-xml
  • php-pear
  • php7.0-mbstring
  • php-mbstring
  • php-php-gettext
  • php-gettext
  • libzip4
  • php7.0-zip
  • php-zip
  • kopano-webapp
  • kopano-webapp-plugin-desktopnotifications
  • kopano-webapp-plugin-filepreviewer
  • php5-common
  • php5-curl
  • php7.0-curl
  • kopano-webapp-plugin-files
  • kopano-webapp-plugin-filesbackend-owncloud
  • libapache2-mod-php7.0
  • php-smbclient
  • kopano-webapp-plugin-filesbackend-smb
  • kopano-webapp-plugin-folderwidgets
  • php7.0-soap
  • php-soap
  • kopano-webapp-plugin-mdm
  • php-kopano-smime
  • php7.0-bcmath
  • php-bcmath
  • kopano-webapp-plugin-smime
  • php5-enchant
  • php7.0-enchant
  • php-enchant
  • kopano-webapp-plugin-spell
  • kopano-webapp-plugin-spell-de-de
  • kopano-webapp-plugin-spell-en
  • kopano-webapp-plugin-spell-nl
  • kopano-webapp-plugin-titlecounter
  • kopano-webapp-plugin-webappmanual
  • kopano4ucs-webapp

Kopano Webapp from the test app repo does NOT show the error msg!
Things seem to be working properly afaict.

Can i find the status of these test packages somewhere, or can you tell me if this is an early test build or close to ready version?

Ah, that is good to hear. The app is mainly about the integration packages (the ones you installed by configuring the z-hub repo). I did need to make a small upgrade to the integration package yesterday evening, but generally speaking I am hoping for a green light from univention and a release relatively soon.

Great! Still testing, so i’m fine using the dev packages for now.
Thanks a lot for your help.

since I have linked to this post a few times: the updated apps mentioned about have now been published.

Meine Lösung unten im Post

Mastodon