I've read numerous on-line posts for installing MongoDB drivers for PHP and nothing seems to be working for me. Can someone give me a simple step by step procedure to follow to try and get Mongo working in my PHP code (it's on a Windows 10 laptop, Mongo version 4.2.2)? I want to use MongoDB on my laptop and experiment with writing PHP to communicate back and forth with Mongo (not looking to use the Cloud at this point in time). Any help would be GREATLY appreciated. Cheers.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/74125147-5cc7-4eb0-8fc9-934691ae6b69%40googlegroups.com.
Thanks Jeremy. I grabbed the dll, restarted IIS after trying a few of them but phpinfo showed nothing in the browser regarding Mongo. Oh and as changed the php.ini before restarting IIS too. Still got no mention of Mongo in the php info command in the browser.
I tried running the command “composer require MongoDB/MongoDB” in a few ways too but one of the error messages was “Unable to load dynamic library ‘C:\php\ext\php_mongodb.dll’”. I don’t have php in that directory but I couldn’t find where to change this. PHP is under a different directory on my laptop altogether.
Common problems are the location of the DLL, the value of the "extension_dir" setting inside php.ini and compile-time setting mismatches
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/f8434a6e-65a5-4922-9a1b-653dfcc884f7%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to mongod...@googlegroups.com.
I must have put my eggs in the one basket. I had modified what I thought was the php.ini but it looks like I grabbed an old php.ini.ini and changed it. I should have double checked the results from the phpinfo like you suggested in the first place. Okay, so that part looks resolved. phpversion('mongodb') in my test PHP script now shows 1.5.3 in the browser.When running "composer require MongoDB/MongoDB" which directory should I be in? My apologies. It's been years since I've done much in the way of installing anything. I've been mainly writing CGI applications using Perl with either MySQL databases or xml documents.
--
On Friday, January 24, 2020 at 6:42:35 PM UTC-5, Jeremy Mikola wrote:On Fri, Jan 24, 2020 at 6:18 PM 'rober...@yahoo.com' via mongodb-user <mongod...@googlegroups.com> wrote:Thanks Jeremy. I grabbed the dll, restarted IIS after trying a few of them but phpinfo showed nothing in the browser regarding Mongo. Oh and as changed the php.ini before restarting IIS too. Still got no mention of Mongo in the php info command in the browser.
I tried running the command “composer require MongoDB/MongoDB” in a few ways too but one of the error messages was “Unable to load dynamic library ‘C:\php\ext\php_mongodb.dll’”. I don’t have php in that directory but I couldn’t find where to change this. PHP is under a different directory on my laptop altogether.https://stackoverflow.com/a/5282287/162228 suggests that "Unable to load dynamic library" may be reported if PHP cannot find the DLL file. If you've only specified `extension=php_mongodb.dll` in php.ini, then PHP would expect to find it in the directory indicated by the extension_dir setting.Resolving Problems in the common PHP.net page I linked above also addresses this:Common problems are the location of the DLL, the value of the "extension_dir" setting inside php.ini and compile-time setting mismatchesphpinfo() should be able to tell you the directory where PHP would be looking for extensions. Alternatively, you can specify an absolute path to the DLL file.If you only saw an "Unable to load dynamic library" error from the CLI environment, I'd suggest you check the error reporting level for your web environment. If you don't have the web SAPI configured to display all errors in the HTTP response, then they should at least be directed to a log file that you can review for debugging purposes.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/f8434a6e-65a5-4922-9a1b-653dfcc884f7%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/4e970750-7076-42f4-87ca-7c8a67d7fec6%40googlegroups.com.