Intermittent mongo error

Just recently i have been getting an intermittent error on a number of sites:

PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/mongo.so' - /usr/lib/php/20151012/mongo.so: cannot open shared object file: No such file or directory

Usually, after one or more page reloads the error goes away and the page loads ok.

I have not seen this happen on my live server, only on local Vagrant running Scotchbox 3 (which is fairly new) so im guessing its a server issue or a kirby issue, since its not limited to one site. All the sites are running 2.5.2

Some people have had similar issues, albeit with other missing libraries. None of these have anything to do with Kirby, so I guess this is some sort of server issue.

I just checked the box and that file is indeed missing but there is a mongodb.so instead. I’m not to sure how to fix it. Im guessing theres a config somewhere that loads PHP modules and it’s looking for one with a deprecated name??

You could check if it is loaded in the php.ini.

I can’t see anything on there.

I’ve added an issue to Scotchboxes repo as it seems to me an issue with that and Scotchbox 3 is a paid for box :slight_smile:

https://github.com/scotch-io/scotch-box/issues/336

If anyone else runs into this, the fix is to comment out a line in the user.ini file. The mongo.so extension has been deprecated and there was a reference to it left behind.

Details here https://github.com/scotch-io/scotch-box/issues/336#issuecomment-316530209