Missing exif , exiv library

I would like to install app maps.
Installation failed because I am missing exif library. I did check system and I have installed
libexif 0.6.21-3 and I have enabled php-set = extension=exif

please, what is wrong? what should I check …
thanks

I am getting this message in log:
PHP Startup: Unable to load dynamic library 'exif # for image rotation in pictures app, requires exiv2' (tried: /usr/lib/php/modules/exif # for image rotation in pictures app, requires exiv2 (/usr/lib/php/modules/exif # for image rotation in pictures app, requires exiv2: cannot open shared object file: No such file or directory), /usr/lib/php/modules/exif # for image rotation in pictures app, requires exiv2.so (/usr/lib/php/modules/exif # for image rotation in pictures app, requires exiv2.so: cannot open shared object file: No such file or directory)) at Unknown#0

I did check that directory and file and I can find only exif.so

ls -la /usr/lib/php/modules/exi*
.rwxr-xr-x 92k root root 29 Aug 14:55 /usr/lib/php/modules/exif.so

I also check what I have install

yay -Qs exif
local/exiv2 0.27.2-1
    Exif, Iptc and XMP metadata manipulation library and tools
local/libexif 0.6.21-3
    A library to parse an EXIF file and read the data from those tags

I did not install maps app. So it is not active too.
But I am still getting mentioned error message in log.

any help?
thanks

You told PHP to load the exif extension and that is most likely the reason why you’re still getting the error messages displayed, although you’ve not activated the maps app :wink:

well, I am still not able to install maps app.
gettint this message while installing it:

App “Maps” cannot be installed because the following dependencies are not fulfilled: The library exif is not available.

so maps app is not installed not activated and I can see error message in log:

PHP Startup: Unable to load dynamic library ‘exif # for image rotation in pictures app, requires exiv2’ (tried: /usr/lib/php/modules/exif # for image rotation in pictures app, requires exiv2 (/usr/lib/php/modules/exif # for image rotation in pictures app, requires exiv2: cannot open shared object file: No such file or directory), /usr/lib/php/modules/exif # for image rotation in pictures app, requires exiv2.so (/usr/lib/php/modules/exif # for image rotation in pictures app, requires exiv2.so: cannot open shared object file: No such file or directory)) at Unknown#0

As I previously wrote, YOU’ve told php to load the external “exif” extension, which means php tries to find an external library named “exif.so” in the directory /usr/lib/php/modules/ - which doesn’t exist.
Very often the exif extension isn’t an external module but a module included into php at compile time! So first I would recommend to revert the "php-set = extension=exif command. Once you’ve done this the exif messages should vanish.

reason why I did enable exif module was that process of installing maps app did end with error message about missing library

OK, I did comment out that settings as you recommended and restart service.

I am still not able to install maps app.

One step after the other. What about the displayed exif errors, are they still displayed?

looks that error message gone

Ok, now please create a php file “info.php”, e.g. in your web servers document root, which contains the following line of code …

<?php phpinfo() ?>

… and open it using your web browser: http://<your-server>/info.php. The PHP system configuration should be displayed. Check if exif support has eventually already been build-in (Configure Command).

at phpinfo I did find exif only in:

  1. Configure Command
    ..... --enable-exif=shared .......

  2. module authors

Ok, so it is definitely a separate package required. Can you tell me a little bit more about your environment:

  • OS/distribution
  • web server
  • PHP version
  • Nextcloud version

archlinux
uwsgi 2.0.18-3 with uwsgi-plugin-php 2.0.18-3
php 7.3.11
NC 17.0.1-1

I also find out that exif module file belong to PHP package

yay -Qo /usr/lib/php/modules/exif.so                                                           :(
/usr/lib/php/modules/exif.so is owned by php 7.3.11-1

maybe it is a bug of PHP package

Ok, what does the following command show:

ldd /usr/lib/php/modules/exif.so

Looks I find solution.

I did follow https://wiki.archlinux.org/index.php/Nextcloud#Security_Hardening when installing NC on my server. I did decide to uwsgi because I am already using it for my django app.

There is a sentence that I dont need to edit global php.ini. Probably it is not written in good way because I did edit it now and enable exif module in /etc/php/php.ini and after restart uwsgi I can see exif module in phpinfo() …

ldd /usr/lib/php/modules/exif.so
	linux-vdso.so.1 (0x00007fff15fad000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007fdf796ab000)
	/usr/lib64/ld-linux-x86-64.so.2 (0x00007fdf7989e000)

well, I was able to install app maps. BUT there is still error message in log that missing exif library.

And also there is a erro from cron “Error: Call to undefined function OCA\Maps\Service\exif_read_data()

Ok, that sound good.Can you please paste the exact error message again.

Please make sure that you’ve correctly enabled the module for the PHP cli too. You can double-chick this by execution “php -m” on the command line.

And also there is a erro from cron “Error: Call to undefined function OCA\Maps\Service\exif_read_data()

Aunt G. recommends to check the load order of the PHP modules:

https://www.php.de/forum/webentwicklung/php-einsteiger/php-tipps-2009/51760-erledigt-call-to-undefined-function-exif_read_data

here is complete error message

[PHP] Error: PHP Startup: Unable to load dynamic library 'exif # for image rotation in pictures app, requires exiv2' (tried: /usr/lib/php/modules/exif # for image rotation in pictures app, requires exiv2 (/usr/lib/php/modules/exif # for image rotation in pictures app, requires exiv2: cannot open shared object file: No such file or directory), /usr/lib/php/modules/exif # for image rotation in pictures app, requires exiv2.so (/usr/lib/php/modules/exif # for image rotation in pictures app, requires exiv2.so: cannot open shared object file: No such file or directory)) at Unknown#0

Please install the exiv2 package on your server.

well, check my second comment, I have already these two packages installed on server:

local/exiv2 0.27.2-1
    Exif, Iptc and XMP metadata manipulation library and tools
local/libexif 0.6.21-3
    A library to parse an EXIF file and read the data from those tags

It is bit strange. I did disable and remove maps app from my nextcloud but still getting that error message. BUT there was no error message during night while I was sleeping. I am thinking that it appears only while working with web gui. What do you think?