0

I'm trying to use mongodb with lsphp. Currently I've manually compiled mongodb.so following this and I can see mongodb.so at /usr/local/lsws/lsphp7/lib/php/extensions/no-debug-non-zts-20160303 . Now, next step in the link is to enable the extension by adding extension=mongodb.so line at php.ini. The problem is that I couldn't find php.ini for the lsphp7.1 version that was compiled with openlitespeed admin GUI. I've searched each folder in /usr/local/lsws/lsphp7 with no result for php.ini.

Screenshot of phpinfo

1 Answers1

0

It seems like no php.ini file is present for the PHP version - what you can do, is to go to /usr/local/lsws/lsphp7/lib and in there put a file called php.ini with the content from https://raw.githubusercontent.com/php/php-src/PHP-7.1.25/php.ini-production

There you can also add your extension=mongodb.so in the bottom of the ini file.

Remember to restart OpenLiteSpeed afterward!

I'm investigating why there's no default php.ini file and will update/comment on my reply whenever I know more!

LucasRolff
  • 169
  • 2