phpMoAdmin-MongoDB-Admin-Tool-for-PHP icon indicating copy to clipboard operation
phpMoAdmin-MongoDB-Admin-Tool-for-PHP copied to clipboard

Doesn't work with MongoDB extension on PHP7.

Open hpolonkoev opened this issue 7 years ago • 14 comments

Hello guys,

Thank you for your efforts developing the tool. Unfortunately it doesn't work on my current local configuration. I am getting message

PHP cannot access MongoDB, you need to install the Mongo extension for PHP.

Configuration:

  • PHP 7.0
  • Apache 2..4.18
  • MongoDB 2.4.10

The extension for PHP 7 I am using is mongodb.so (http://php.net/manual/en/mongodb.installation.pecl.php) After going through your code, it looks like you are only testing if the mongo extension is available. The second test you doing is on the MongoClient and Mongo classes. MongoClient is deprecated. (http://php.net/manual/en/class.mongoclient.php) And I am not sure about Mongo, couldn't figure out how to install it.

If you could update your tool to support the latest MongoDB extension and the latest class http://php.net/manual/en/class.mongodb-driver-manager.php, I would apreciate it.

Thanks.

hpolonkoev avatar May 09 '17 15:05 hpolonkoev

This is on the to-do list. Supporting the new MongoDB extension is a big job as the entire syntax has changed, and the only supported-method to continue to use the (substantially more user-friendly) legacy-syntax is to include a userland PHP library, which is not an ideal option for phpMoAdmin since one of the key ease-of-use factors is that it is contained in a single-file.

MongoDB-Rox avatar May 14 '17 04:05 MongoDB-Rox

@MongoDB-Rox Thanks and good luck!

hpolonkoev avatar May 24 '17 09:05 hpolonkoev

I would also vote to go for the new php extension.

cytopia avatar May 25 '17 08:05 cytopia

Any update guys? I have the same problem and hope this awesome tool can run on PHP 7.

nhanledev avatar Aug 09 '17 03:08 nhanledev

+1

Santana1053 avatar Sep 01 '17 13:09 Santana1053

+1

re8260 avatar Nov 28 '17 09:11 re8260

+1

morozovsk avatar Dec 14 '17 20:12 morozovsk

Honestly, having libraries isn't a big deal. 2 files is better than 0 working files, and plenty of upstanding projects include libraries -- better to use something tried and true than unnecessarily reinvent the wheel. Besides, it's the recommended method from mongodb themselves.

In any case, the joke with Debian is that while secure, "your packages are outdated by a year or more." Current Debian stable has us on PHP7, and if we're talking ease-of-use, dropping and extracting an archive is a lot easier than the thing not working. :P

(Best of luck with everything!)

mpql avatar Feb 05 '18 18:02 mpql

still doesnt work with php 7. Mark this as a dead project.

X25guru avatar Jul 12 '19 20:07 X25guru

As this project is dead, I can recomment some desktop clients:

  • https://robomongo.org/ (Robo 3T) (works with virtual machines)
  • https://www.dbkoda.com/ (doesn't work with virtual machines but better UI)

simonschaufi avatar Jul 23 '19 19:07 simonschaufi

That is really helpful, thank you, @simonschaufi!

mpql avatar Jul 23 '19 22:07 mpql

There's always MongoDB Compass Community version if you want an officially supported tool

niccottrell avatar Jul 24 '19 07:07 niccottrell

I forked the project here to make it work with PHP7 and mongodb/mongodb package (so, one requires to install package with composer). The overall functionalities seem to work now.

ali-khalili avatar Mar 29 '20 15:03 ali-khalili

Here are some alternatives to phpMoAdmin:

  • https://github.com/lovetheidea/MoaDB
  • https://github.com/tetreum/mongolo
  • https://github.com/SamuelTS/MongoDB-PHP-GUI

SamuelTallet avatar Jul 12 '20 14:07 SamuelTallet