I have installed rockmongo in my ubuntu from this site.When I tried to open the rockmongo from browser it showing fatal error as like mentioned below.
Error:
Fatal error: ini_set(): To prevent data corruption, you are not allowed to turn on the mongo.native_long setting on 32-bit platforms in Unknown on line 0
How can i resolve this issue,can anyone give me a solution for this issue.
native_long support for 32-bits has been (quite logically) removed from the mongo driver. . RockMongo uses ini_set("mongo.native_long", 1);
in its index.php. As a quick fix, comment this line out.
The quick fix is here, in index.php
replace the ini_set line :
ini_set("mongo.native_long", 1);
with:
ini_set('mongo.native_long', strlen(decbin(~0)) == 32 ? 0 : 1);
Or just remove it, the default value is 1 anyway
In my configuration
Windows 7, Apache 2, PHP 5.5 [API220121212,TS,VC11], Mongo 2.6, Mongo PHP extension 1.5.7
only the combination of
ini_set("mongo.native_long", 0);
ini_set("mongo.long_as_object", 1);
helped to recover from the "Cannot natively represent the long 9223372036854775807 on this platform" error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With