php-mapi issues
-
Hi,
I was wondering if someone could shed some light on the issue im having, Currently installing kopano web using NGINX but getting this errorNot 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/php/7.2/fpm/php.ini' file. You can disable this configuration check by editing the file '/usr/share/kopano-webapp/config.php', but this is not recommended.
This is my version of php
PHP Version => 7.2.3-1ubuntu1
and already have the newest version but not sure if php7.2 is not compatible?
Reading package lists... Done Building dependency tree Reading state information... Done php7-mapi is already the newest version (9.0.2.136.23788f744-0+236.1). 0 upgraded, 0 newly installed, 0 to remove and 371 not upgraded. root@hermes:~#
Thank you
-
So after reinstalling put version 7.0 still got the same error, but whats more odd is that there is no /etc/kopano/server.cfg
wget https://download.kopano.io/community/core%3A/core-9.0.2.136.4e5c5e0-Ubuntu_16.04-amd64.tar.gz 22 tar xfvz core-9.0.2.136.4e5c5e0-Ubuntu_16.04-amd64.tar.gz 23 cd core-9.0.2.136.4e5c5e0-Ubuntu_16.04-amd64/ 24 ls 25 dpkg -i * .deb 26 apt-get install -f 27 dpkg -i * .deb
-
Hi @killmasta93,
since the php-mapi module needs to be compiled against the abi of php Kopano only supports the default php version of each distribution. If you want to update php from an external repository you would need to compile your own php-mapi module.
as for the error message in the first post: the message tells you that php-mapi is not loaded in your php configuration. it even tells you where to check first. did you look into that file?
Another way to check loaded modules is shown in https://stackoverflow.com/questions/478844/how-do-i-see-the-extensions-loaded-by-php (but modules may/will be different for cli and fpm).
@killmasta93 said in php-mapi issues:
but whats more odd is that there is no /etc/kopano/server.cfg
Yes, that is expected and explained in the manual as well.
-
Thanks for the reply, currently using this guide https://documentation.kopano.io/kopanocore_administrator_manual/installing.html#deb-based-distributions
then i found this guide and yes your right i had to move the server.cfg to /etc/kopano
https://kb.kopano.io/display/WIKI/Coreas for the error for now i ignored it putting FALSE
// Comment next line to disable the config check (or set FALSE to log the config errors) define("CONFIG_CHECK", FALSE);
then reload the webpage i got the http 500 error a blank page on chrome and checked the server to see the service
● kopano-server.service - Kopano Groupware Core Storage Server Loaded: loaded (/lib/systemd/system/kopano-server.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2019-12-28 13:24:35 -05; 1s ago Docs: man:kopano-server(8) man:kopano-server.cfg(5) man:kopano-admin(8) Main PID: 12992 (kopano-server) Tasks: 30 Memory: 17.6M CPU: 37ms CGroup: /system.slice/kopano-server.service └─12992 /usr/sbin/kopano-server Dec 28 13:24:35 hermes systemd[1]: Stopped Kopano Groupware Core Storage Server. Dec 28 13:24:35 hermes systemd[1]: Started Kopano Groupware Core Storage Server. Dec 28 13:24:35 hermes kopano-server[12992]: Starting kopano-server version 9.0.2 (pid 12992 uid 0) Dec 28 13:24:35 hermes kopano-server[12992]: Starting kopano-server version 9.0.2 (pid 12992 uid 999)
and this my NGINX config
upstream php-handler { server 127.0.0.1:9002; #server unix:/var/run/php5-fpm.sock; #server unix:/var/run/php7.2-fpm.sock; } server{ listen 80; charset utf-8; listen [::]:80; server_name _; location / { rewrite ^(.*) https://$server_name$1 permanent; } } server { charset utf-8; listen 443; listen [::]:443 ssl; server_name mail.mydomain.com; ssl on; client_max_body_size 1024m; ssl_certificate /etc/nginx/ssl/fullchain.pem; ssl_certificate_key /etc/nginx/ssl/privkey.pem; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256; ssl_prefer_server_ciphers on; # # ssl_dhparam require you to create a dhparam.pem, this takes a long time # ssl_dhparam /etc/ssl/certs/dhparam.pem; # # add headers server_tokens off; add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; location ~ /.well-known { root /var/www/letsencrypt; allow all; } location /phpmyadmin { allow 192.168.3.0/24; deny all; } location /webapp { alias /usr/share/kopano-webapp/; index index.php; location ~ /webapp/presence/ { rewrite ^/webapp/presence(/.*)$ $1 break; proxy_pass http://localhost:1234; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_http_version 1.1; } } location ~* ^/webapp/(.+\.php)$ { alias /usr/share/kopano-webapp/; # deny access to .htaccess files location ~ /\.ht { deny all; } fastcgi_param PHP_VALUE " register_globals=off magic_quotes_gpc=off magic_quotes_runtime=off post_max_size=31M upload_max_filesize=30M "; fastcgi_param PHP_VALUE "post_max_size=31M upload_max_filesize=30M max_execution_time=3660 "; include fastcgi_params; fastcgi_index index.php; #fastcgi_param HTTPS on; fastcgi_param SCRIPT_FILENAME $document_root$1; fastcgi_pass php-handler; access_log /var/log/nginx/kopano-webapp-access.log; error_log /var/log/nginx/kopano-webapp-error.log; # CSS and Javascript location ~* \.(?:css|js)$ { expires 1y; access_log off; add_header Cache-Control "public"; } # All (static) resources set to 2 months expiration time. location ~* \.(?:jpg|gif|png)$ { expires 2M; access_log off; add_header Cache-Control "public"; } # enable gzip compression gzip on; gzip_min_length 1100; gzip_buffers 4 32k; gzip_types text/plain application/x-javascript text/xml text/css application/json; gzip_vary on; } } map $http_upgrade $connection_upgrade { default upgrade; '' close; }
Thank you
edit: while checking the logs it seems i need the php-mapi, i tried to enable it
phpenmod php7-mapi WARNING: Module php7-mapi ini file doesn't exist under /etc/php/7.0/mods-available WARNING: Module php7-mapi ini file doesn't exist under /etc/php/7.0/mods-available WARNING: Module php7-mapi ini file doesn't exist under /etc/php/7.0/mods-available
but whats odd it shows i have the mapi installed but no extensions related to this
php -r "print_r(get_loaded_extensions());" Array ( [0] => Core [1] => date [2] => libxml [3] => openssl [4] => pcre [5] => zlib [6] => filter [7] => hash [8] => pcntl [9] => Reflection [10] => SPL [11] => session [12] => standard [13] => PDO [14] => calendar [15] => ctype [16] => enchant [17] => exif [18] => fileinfo [19] => ftp [20] => gettext [21] => iconv [22] => json [23] => Phar [24] => posix [25] => readline [26] => shmop [27] => sockets [28] => sysvmsg [29] => sysvsem [30] => sysvshm [31] => tokenizer [32] => Zend OPcache )
-
I don’t think the configuration file is installed for php-fpm. you have to copy it over.
-
@killmasta93 said in php-mapi issues:
php -r “print_r(get_loaded_extensions());”
Thanks for the reply, so upgraded to ubuntu 18.10 re-did the config this time it does show now the mapi plugin enabled but still get the PHPmapi extension not found, im somewhat lost on what you said about the php config file?
php -r "print_r(get_loaded_extensions());" Array ( [0] => Core [1] => date [2] => libxml [3] => openssl [4] => pcre [5] => zlib [6] => filter [7] => hash [8] => pcntl [9] => Reflection [10] => SPL [11] => sodium [12] => session [13] => standard [14] => PDO [15] => xml [16] => calendar [17] => ctype [18] => dom [19] => enchant [20] => mbstring [21] => fileinfo [22] => ftp [23] => gettext [24] => iconv [25] => json [26] => mapi [27] => exif [28] => Phar [29] => posix [30] => readline [31] => shmop [32] => SimpleXML [33] => sockets [34] => sysvmsg [35] => sysvsem [36] => sysvshm [37] => tokenizer [38] => wddx [39] => xmlreader [40] => xmlwriter [41] => xsl [42] => zip [43] => Zend OPcache )
-
@killmasta93 said in php-mapi issues:
phpenmod php7-mapi
O i see what you meant i went to /usr/share/kopano/php/mapi copy the mapi.ini to /etc/php/7.2/mods-available restarted the service php and reload the webpage but still the phpmapi no found very odd
/etc/php/7.2/mods-available# ls -l -h total 124K -rw-r--r-- 1 root root 74 Jun 4 2019 calendar.ini -rw-r--r-- 1 root root 71 Jun 4 2019 ctype.ini -rw-r--r-- 1 root root 66 Jun 4 2019 dom.ini -rw-r--r-- 1 root root 74 Jun 4 2019 enchant.ini -rw-r--r-- 1 root root 70 Jun 4 2019 exif.ini -rw-r--r-- 1 root root 74 Jun 4 2019 fileinfo.ini -rw-r--r-- 1 root root 69 Jun 4 2019 ftp.ini -rw-r--r-- 1 root root 73 Jun 4 2019 gettext.ini -rw-r--r-- 1 root root 71 Jun 4 2019 iconv.ini -rw-r--r-- 1 root root 68 Jun 4 2019 json.ini -rw-r--r-- 1 root root 153 Dec 28 21:15 kopano.ini -rw-r--r-- 1 root root 153 Dec 28 21:35 mapi.ini -rw-r--r-- 1 root root 76 Jun 4 2019 mbstring.ini -rw-r--r-- 1 root root 79 Jun 4 2019 opcache.ini -rw-r--r-- 1 root root 69 Jun 4 2019 pdo.ini -rw-r--r-- 1 root root 70 Jun 4 2019 phar.ini -rw-r--r-- 1 root root 71 Jun 4 2019 posix.ini -rw-r--r-- 1 root root 76 Jun 4 2019 readline.ini -rw-r--r-- 1 root root 71 Jun 4 2019 shmop.ini -rw-r--r-- 1 root root 72 Jun 4 2019 simplexml.ini -rw-r--r-- 1 root root 73 Jun 4 2019 sockets.ini -rw-r--r-- 1 root root 73 Jun 4 2019 sysvmsg.ini -rw-r--r-- 1 root root 73 Jun 4 2019 sysvsem.ini -rw-r--r-- 1 root root 73 Jun 4 2019 sysvshm.ini -rw-r--r-- 1 root root 75 Jun 4 2019 tokenizer.ini -rw-r--r-- 1 root root 67 Jun 4 2019 wddx.ini -rw-r--r-- 1 root root 66 Jun 4 2019 xml.ini -rw-r--r-- 1 root root 72 Jun 4 2019 xmlreader.ini -rw-r--r-- 1 root root 72 Jun 4 2019 xmlwriter.ini -rw-r--r-- 1 root root 66 Jun 4 2019 xsl.ini -rw-r--r-- 1 root root 66 Jun 4 2019 zip.ini
-
Hi @killmasta93,
strange, I have checked on my system and there the php module is properly installed and activated after installing the package.
@killmasta93 said in php-mapi issues:
so upgraded to ubuntu 18.10
generally speaking I would recommend to stick to distributions that are listed as supported in the manual. There may/are more distributions in the nightly upload, but these are really just there for testing purposes.
If you are looking for a more out of the box experience I would recommend https://www.univention.com/products/univention-app-center/app-catalog/kopano-core/.
-
Thank you for the reply, so i figured out i had to run phpenmod mapi and restart php service and i get the web interface
Thank you again
ill postback if anything new comes up
for anyone else having this issue
the steps took
/usr/share/kopano/php/mapi copy the mapi.ini to /etc/php/7.2/mods-available
then run phpenmod mapi and restart php service