Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficulty setting "extension=mongodb.so" value in php.ini file for MongoDB Service setup on Drupal #59

Closed
prashantdsala opened this issue Jun 6, 2023 · 1 comment

Comments

@prashantdsala
Copy link

prashantdsala commented Jun 6, 2023

I'm having trouble configuring the extension=mongodb.so value in the server's php.ini file while setting up the MongoDB service on Drupal. The installation process for everything else is going smoothly.

Here is the content of my .lando.yml file:

name: drupal
recipe: drupal10
config:
  webroot: web
  composer_version: 2.2.16
  via: nginx
  php: 8.1
  database: 'mariadb:10.4'
services:
  myservice:
    type: phpmyadmin
  mongoservice:
    type: mongo
    portforward: true
    creds:
      - mongo
  phpservice:
    type: php
    build_as_root:
      - pecl install mongodb
      - docker-php-ext-enable mongodb
    config:
      php: config/php.ini

And here is the code in the php.ini file:

[PHP]

extension=mongodb.so

I'm receiving the following warnings:

Build process completed successfully Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20190902/mongodb.so' install ok: channel:https://pecl.php.net/mongodb-1.15.3 configuration option "php_ini" is not set to php.ini location You should add "extension=mongodb.so" to php.ini

Could you please provide any advice or guidance on this issue? Thank you in advance.

@pirog pirog transferred this issue from lando/lando Jun 6, 2023
@pirog pirog added Needs Triage and removed drupal labels Jun 6, 2023
@reynoldsalec
Copy link
Sponsor Member

@prashantdsala you don't need to set extension=mongodb.so if you've installed mongo via your build_as_root steps.. I tried this on a drupal10 recipe and it successfully enabled the mongo extension.

Are you sure you want to install Mongo on a custom phpservice service instead of using the appserver service that is the default appserver on the drupal10 recipe?

Definitely reopen if you need more help with this or use the Lando Slack, closing out since I'm guessing you've found a way around the issue in the last couple months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants