Home > Net >  PHP Warning: PHP Startup: Can't load module 'C:\xampp\php\ext\php_mongodb.dll' as
PHP Warning: PHP Startup: Can't load module 'C:\xampp\php\ext\php_mongodb.dll' as

Time:05-30

Please help me

I am having an issue while the Laravel MongoDB connection. when running this command :"composer require jenssegers/mongodb". I got this warning message:

LENOVO@DESKTOP-7MHNLPS MINGW64 /c/xampp8/htdocs/mongotest $ composer require jenssegers/mongodb PHP Warning: PHP Startup: Can't load module 'C:\xampp\php\ext\php_mongodb.dll' as it's linked with 14.29, but the core is linked with 14.16 in Unknown on line 0 Warning: PHP Startup: Can't load module 'C:\xampp\php\ext\php_mongodb.dll' as it's linked with 14.29, but the core is linked with 14.16 in Unknown on line 0 Info from https://repo.packagist.org: #StandWithUkraine Using version ^3.9 for jenssegers/mongodb ./composer.json has been updated Running composer update jenssegers/mongodb Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires jenssegers/mongodb ^3.9 -> satisfiable by jenssegers/mongodb[v3.9.0]. - jenssegers/mongodb v3.9.0 requires illuminate/support ^9.0 -> found illuminate/support[v9.0.0-beta.1, ..., 9.x-dev] but these were not loaded, likely because it conflicts with another require. You can also try re-running composer require with an explicit version constraint, e.g. "composer require jenssegers/mongodb:" to figure out if any version is installable, or "composer require jenssegers/mongodb:^2.1" if you know which you need. Installation failed, reverting ./composer.json and ./composer.lock to their original content.*

I am using XAMPP on windows 10 and my PHP version is 8.1.6 and MongoDB version is 5.0.8. I have tried three different php_mongodb.dll.

  1. php_mongodb-1.13.0-8.1-ts-vs16-x64
  2. php_mongodb-1.12.1-8.1-ts-vs16-x64
  3. php_mongodb-1.12.0-8.1-ts-vs16-x64

and also added extension=php_mongodb.dll in the php.ini file.

I don't understand this warning and I have no clue how to resolve it.

PHP Warning: PHP Startup: Can't load module 'C:\xampp\php\ext\php_mongodb.dll' as it's linked with 14.29, but the core is linked with 14.16 in Unknown on line 0

Please help me and Thanks in Advance.

CodePudding user response:

Maybe try this composer require jenssegers/mongodb --ignore-platform-reqs

  • Related