PHP执行mongodb指令的时候,返回报错如下:

Cannot natively represent the long 6432067654403489793 on this platform

解决办法,在php头部添加如下代码即可:

ini_set('mongo.long_as_object', 1);

Related Posts: mongodb Cannot natively represent the long on this platform 解决办法 :