PHP Startup: Unable to load dynamic library 'fileinfo' undefined symbol

Viewed 537

On startup of apache I encounter a problem with fileinfo (undefined symbol: pcre_get_compiled_regex_cache_ex).

  • I'm on Debian buster (10)
  • php 7.3 cgi is used
  • checked via phpinfo() that the correct php.ini is used (fileinfo not shown as module)
  • the file is located in /usr/lib/php/20180731/fileinfo.so
  • there are no known problems with other extensions

By executing php -c /var/www/conf/web24/php.ini -i |grep fileinfo I get

/etc/php/7.3/cli/conf.d/20-fileinfo.ini,
fileinfo
fileinfo support => enabled

When I restart apache, I get the following error message:

PHP Warning:  PHP Startup: Unable to load dynamic library 'fileinfo' (tried: /usr/lib/php/20180731/fileinfo (/usr/lib/php/20180731/fileinfo: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/fileinfo.so (/usr/lib/php/20180731/fileinfo.so: undefined symbol: pcre_get_compiled_regex_cache_ex)) in Unknown on line 0

Any help would be greatly appreciated.

1 Answers

Old thread, but in case someone is still struggling with this:

I had the exact same issue after upgrading to rh-php73-php-common-7.3.20. I replaced fileinfo.so with a copy from the rh-php73-php-common-7.3.11 RPM. That fixed it for me, for this particular version.

Related