iwind/rockmongo

rockmongo php deprecated and php warning

helplakmal opened this issue · 3 comments

after i add data to mongo db using insert option in rockmongo following php deperecated and php warning appeared in php error log.
[27-Oct-2014 09:18:02 UTC] PHP Deprecated: MongoCollection::insert(): The 'safe' option is deprecated, please use 'w' instead in /var/www/rockmongo/app/lib/mongo/RQuery.php on line 504
[27-Oct-2014 09:18:02 UTC] PHP Warning: MongoCollection::insert(): Using w=1 rather than w=0 as suggested by deprecated 'safe' value in /var/www/rockmongo/app/lib/mongo/RQuery.php on line 504

in current git version file "RQuery.php" have only 327 lines :s
https://github.com/iwind/rockmongo/blob/master/app/lib/mongo/RObject.php
if
you are using old version please update to git version because iwind fixed some issue on Jun 5 "Fix MongoCollection::update(safe => true) issue "
else
we have to look at issue :)

there's still many PHP Deprecated in error logs,just like these:
PHP message: PHP Deprecated: MongoCollection::count(): The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead in /data/www/htdocs/rockmongo/app/controllers/admin.php on line 65
PHP message: PHP Deprecated: MongoCollection::count(): The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead in /data/www/htdocs/rockmongo/app/controllers/admin.php on line 65
PHP message: PHP Deprecated: MongoCollection::count(): The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead in /data/www/htdocs/rockmongo/app/controllers/admin.php on line 65
PHP message: PHP Deprecated: MongoCollection::count(): The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead in /data/www/htdocs/rockmongo/app/controllers/admin.php on line 65" while reading response header from upstream, client: 222.211.172.205, server: 192.168.0.1, request: "GET /rockmongo/index.php?action=admin.dbs&db=Groups HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "ip", referrer: "http://ip/rockmongo/index.php?action=admin.dbs"
2015/09/15 18:12:28 [error] 9152#0: *858085 FastCGI sent in stderr: "PHP message: PHP Deprecated: MongoDB::command(): The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead in /data/www/htdocs/rockmongo/app/models/MCollection.php on line 54
PHP message: PHP Deprecated: MongoCollection::findOne(): The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead in /data/www/htdocs/rockmongo/app/models/MCollection.php on line 5
PHP message: PHP Deprecated: MongoCollection::getIndexInfo(): The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead in /data/www/htdocs/rockmongo/app/controllers/collection.php on line 166
PHP message: PHP Deprecated: MongoCollection::count(): The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead in /data/www/htdocs/rockmongo/app/controllers/collection.php on line 167
PHP message: PHP Deprecated: MongoCollection::find(): The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead in /data/www/htdocs/rockmongo/app/lib/mongo/RQuery.php on line 365
PHP message: PHP Deprecated: MongoCursor::count(): The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead in /data/www/htdocs/rockmongo/app/lib/mongo/RQuery.php on line 493
PHP message: PHP Deprecated: MongoCollection::find(): The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead in /data/www/htdocs/rockmongo/app/lib/mongo/RQuery.php on line 365" while reading response header from upstream, client: 222.211.172.205, server: 192.168.0.1, request: "GET /rockmongo/index.php?action=collection.index&db=Groups&collection=data_tables HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "ip", referrer: "http://ip/rockmongo/index.php?action=admin.dbs&db=Groups"

Vote on this issue please #133