Not Found: PHP mapi extension not found



  • Hi,

    Kopano Core is running. Now I downloaded and installed succesfully the webapp.
    I’m running it on: Ubuntu 18.04

    I used this procedure for the installation:

    	//Installation of Webapp
    	mkdir -p /home/kopano/webapp
    	cd /home/kopano/webapp
    	wget https://download.kopano.io/community/webapp:/webapp-3.4.14.1465%2B836-Ubuntu_18.04-all.tar.gz
    	tar xfvz webapp-3.4.14.1465+836-Ubuntu_18.04-all.tar.gz
    	cd /home/kopano
    	apt-ftparchive packages webapp/ > webapp/Packages
    	echo "deb [trusted=yes] file:/home/kopano webapp/" > /etc/apt/sources.list.d/kopano-com.list
    	apt update
    	apt install kopano-server-packages kopano-webapp
    	
    	cd /etc/kopano/webapp
    	nano config.php
    	// Changes made in the config file (just for testing)
    	define(„INSECURE_COOKIES“,true);
    	
    	service apache2 reload
    	sudo ln -s /etc/php/7.2/mods-available/kopano.ini /etc/php/7.2/apache2/conf.d/
    

    Now I’m getting the error mention in the topic when I want to open the Kopano Webapp webpage. Yes I found and tried that: https://kb.kopano.io/display/TS/PHP+mapi+extension+not+found
    It’s still not working the kopano.ini is in: /etc/php/7.2/apache2/conf.d/kopano.ini
    And this: https://forum.kopano.io/topic/217/php7-mapi-not-found/5 didn’t help either :(.

    My whole installation is based on: https://www.pc-howto.com/kopano-der-neue-stern-am-groupwarehimmel-teil-1/#comment-152876

    Any ideas?

    Thanks for any help.


  • Kopano

    Hi hispeed,

    it looks like you didn’t install the php-mapi (or php7-mapi) package. Don’t forget to reload apache after installing it.

    Manfred



  • Probably you’re right…

    Next question how do I install that? I have done the installation of the core like that:

    // Beginn der Core Installation auf Ubuntu von Kopano
    mkdir -p /home/kopano/amd64
    cd /home/kopano/amd64
    wget https://download.kopano.io/community/core:/core-8.6.80.760_0%2B90-Ubuntu_18.04-amd64.tar.gz
    tar xfvz core-8.6.80.760_0+90-Ubuntu_18.04-amd64.tar.gz
    cd core-8.6.80.760_0+90-Ubuntu_18.04-amd64
    cd /home/kopano
    apt-ftparchive packages amd64/ > amd64/Packages
    echo "deb [trusted=yes] file:/home/kopano amd64/" > /etc/apt/sources.list.d/kopano-com.list
    apt update
    apt install kopano-server-packages
    

    I was thinking the core is now complete installed because fbartels helped me ^^.

    apt install apache2 libapache2-mod-php7.0
    phpenmod kopano <-- I have installed apache with the following command: apt-get install mysql-server apache2 phpmyadmin


  • Kopano

    Hi hispeed,

    yes, the core installation is probably completed, but e.g. WebApp and Z-Push require php-mapi package. As I understood you created a local repository, so you should be able to do the following:

    apt install php-mapi
    

    (or maybe it’s called php7-mapi on Ubuntu 18).

    Manfred



  • Thanks for your answer.

    root@svgwma-kopa-02:/etc/php/7.2/apache2/conf.d# apt install php7-mapi
    Paketlisten werden gelesen... Fertig
    Abhängigkeitsbaum wird aufgebaut.
    Statusinformationen werden eingelesen.... Fertig
    php7-mapi ist schon die neueste Version (8.6.80.760-0+90.1).
    php7-mapi wurde als manuell installiert festgelegt.
    0 aktualisiert, 0 neu installiert, 0 zu entfernen und 3 nicht aktualisiert.
    

    Unfortunately it’s still not working and it looks like, it’s already installed.
    Is there any log files which could help?


  • Kopano

    Hi hispeed,

    then it’s not enabled or correctly configured in apache. Did you do:

    phpenmod kopano
    service apache reload
    

    ?
    Or you could create a php file which contains phpinfo(), open it in browser and search for mapi.

    <?php
    phpinfo();
    

    To check if php-mapi is available on CLI run

    php -i | fgrep mapi -A 4
    

    Manfred



  • I recieve that:

    root@svgwma-kopa-02:/etc/php/7.2/apache2/conf.d# phpenmod kopano
    WARNING: Module kopano ini file doesn't exist under /etc/php/7.2/mods-available
    WARNING: Module kopano ini file doesn't exist under /etc/php/7.2/mods-available
    

    It doesn’t look so good…

    I found out that the kopano.ini file was empty in /etc/php/7.2/apache2/conf.d
    how should that file look like?


  • Kopano

    Hi hispeed,

    then maybe the package wasn’t installed correctly? Did you run php -i | fgrep mapi -A 4?

    The kopano.ini file contents:

    ; Enable MAPI extension module
    extension=mapi.so
    ; Adding path with php mapi classes to include dir
    include_path="${include_path}:/usr/share/kopano/php"
    

    Manfred



  • The problem was kopano.ini and it happens like that.

    If you’re installing it on a fresh installation the default kopano.ini with the as you mention above will be in:
    /etc/php5/mods-available/kopano.ini
    If you create a symlink with https://kb.kopano.io/display/TS/PHP+mapi+extension+not+found it will not work and mostly just create a empty kopano.ini file.
    Copy the lines from you kopano.ini file and create manually with nano a new one in: /etc/php/7.2/apache2/conf.d
    After that you can delete the file: /etc/php5/mods-available/kopano.ini

    Thanks for your help.

    I can now successfully view the webapp.


  • Kopano

    Yes, that is a known issue already: https://jira.kopano.io/browse/KC-1121


Log in to reply