Intermittent "Module 'fileinfo' already loaded" error?

No issues with a new Kirby 3 site in my dev environment, but when deployed on a remote server, Kirby frequently gives me a Module 'fileinfo' already loaded error when trying to load a page on the site.

The weird part is that it looks like the entire correct page renders and loads, but the Kirby error page is tacked onto the end. When I reload the page, everything works as intended. This error seems to show up just once every ten or fifteen page loads.

I’m sure this probably has more to do with my server environment than Kirby, but I’d appreciate some help troubleshooting. Anyone know what’s wrong here?

Hm, do you have duplicate module entries in your php.ini or are you using multiple php.ini files?

How do you deploy?

Could you post the results of phpinfo()?

Sorry for the slow reply!

I checked my phprc file and noticed it had the line extension = fileinfo.so in it. I commented it out and haven’t received the “fileinfo loaded” error since then. I guess that could have solved the problem.

phpinfo is here. Thanks for your help.

phpinfo() shows the extension is already compiled in: -enable-fileinfo=shared, so enabling it in an .ini file caused the issue, I guess.

1 Like