1
我有一个MongoDB PHP库的问题。我试图在集合中找到某些东西,但得到这个错误。PHP Mongo库溢出检测
Fatal error:
Uncaught MongoDB\Driver\Exception\InvalidArgumentException: Integer overflow detected on your platform: 1484960424767 in C:\xampp\htdocs\gameid\vendor\mongodb\mongodb\src\Operation\Find.php:222
Stack trace:
#0 C:\xampp\htdocs\gameid\vendor\mongodb\mongodb\src\Operation\Find.php(222): MongoDB\Driver\Cursor->setTypeMap(Array)
#1 C:\xampp\htdocs\gameid\vendor\mongodb\mongodb\src\Operation\FindOne.php(105): MongoDB\Operation\Find->execute(Object(MongoDB\Driver\Server))
#2 C:\xampp\htdocs\gameid\vendor\mongodb\mongodb\src\Collection.php(559): MongoDB\Operation\FindOne->execute(Object(MongoDB\Driver\Server))
#3 C:\xampp\htdocs\gameid\index.php(7): MongoDB\Collection->findOne(Array)
#4 {main} Next MongoDB\Driver\Exception\InvalidArgumentException: Integer overflow detected on your platform: 1484960529934 in C:\xampp\htdocs\gameid\vendor\mongodb\mongodb\src\Operation\Find.php:222
Stack trace:
#0 C:\xampp\htdocs\gameid\vendor\mongodb\mongodb\src\Operation\Find.php(222): MongoDB\Driver\Cursor->setTypeMap(Array)
#1 C:\ in C:\xampp\htdocs\gameid\vendor\mongodb\mongodb\src\Operation\Find.php on line 222
这里是我的源代码:
$con = new MongoDB\Client('mongodb://user:[email protected]:port/ripes');
$con = $con->ripes->games;
$result = $con->findOne(['gameID' => 'KUDl-xvjWkPJkjTRf-']);
有什么不对?如果该条目不存在,则PHP不会报告任何错误。
您的数据库实例中是否包含大量项目? – Farkie
在DB中只有一个项目 – Markus