bobthecow / genghis

The single-file MongoDB admin app
http://genghisapp.com
MIT License
1.45k stars 166 forks source link

'safe' option is deprecated #137

Closed rtorcato closed 11 years ago

rtorcato commented 11 years ago

Using mongoclient instead of mongo I get when trying to delete document:

PHP error: MongoCollection::remove(): The 'safe' option is deprecated, please use 'w' instead

similar errors for updates and inserts.

bobthecow commented 11 years ago

Are you using a HEAD install of the PHP MongoDB driver?

rtorcato commented 11 years ago

it's latest version. https://github.com/mongodb/mongo-php-driver

they updated to mongoclient awhile ago http://derickrethans.nl/mongoclient.html

bobthecow commented 11 years ago

Yeah, but they didn't start with the deprecation warnings until after the current released version, iirc. Did you install from source? Or are you seeing that error with a released version of the driver?

rtorcato commented 11 years ago

this is the driver i am using: curl https://codeload.github.com/mongodb/mongo-php-driver/zip/master > mongo-php-driver-master.zip

bobthecow commented 11 years ago

Gotcha. That's an unreleased version with a backwards compatibility break. As usually.

I'll get a fix out by the time it's released :)

rtorcato commented 11 years ago

ah ok. Ya I was having a hard time trying to get mongo extension to install on bitnami lamp stack and had to use curl to install the zip. I guess I should've paid more attention to the issues with that version. It's a dev server anyway. So not a big deal on my side.

thanks for the quick replies.

bobthecow commented 11 years ago

you might(?) be able to get the warnings to go away by changing the PHP error level for that server or app. give it a shot and let me know if it works?

rtorcato commented 11 years ago

hmm changed the php error level but it didn't work.

bobthecow commented 11 years ago

@rtorcato Mind giving the develop branch version a try? It should be fixed.

rtorcato commented 11 years ago

hey it works….great job! thanks

bobthecow commented 11 years ago

no problem. i'll close this issue, but it likely won't be released until either the next version of the driver ships, or Genghis ships v2.4.

bobthecow commented 10 years ago

This has been released in v2.3.9.

demorf commented 10 years ago

I get the same error with the latest version of the driver and latest version of mongoDB on windows 7.