You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

42 lines
1.0 KiB

  1. <?php
  2. /**
  3. * RockMongo startup
  4. *
  5. * In here we define some default settings and start the configuration files
  6. * @package rockmongo
  7. */
  8. /**
  9. * Defining version number and enabling error reporting
  10. */
  11. define("ROCK_MONGO_VERSION", "1.1.8");
  12. error_reporting(E_ALL);
  13. /**
  14. * Environment detection
  15. */
  16. if (!version_compare(PHP_VERSION, "5.0")) {
  17. exit("To make things right, you must install PHP5");
  18. }
  19. if (!class_exists("Mongo") && !class_exists("MongoClient")) {
  20. exit("To make things right, you must install php_mongo module. <a href=\"http://www.php.net/manual/en/mongo.installation.php\" target=\"_blank\">Here for installation documents on PHP.net.</a>");
  21. }
  22. // enforce Mongo support for int64 data type (Kyryl Bilokurov <kyryl.bilokurov@gmail.com>)
  23. if (PHP_INT_SIZE == 8) {
  24. ini_set("mongo.native_long", 1);
  25. ini_set("mongo.long_as_object", 1);
  26. }
  27. /**
  28. * Initializing configuration files and RockMongo
  29. */
  30. require "config.php";
  31. require "rock.php";
  32. rock_check_version();
  33. rock_init_lang();
  34. rock_init_plugins();
  35. Rock::start();
  36. ?>