Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. mongod --version
  2. db version v3.2.8
  3.  
  4. php -i | grep mongo
  5. /etc/php/7.0/cli/conf.d/20-mongodb.ini,
  6. mongodb
  7. mongodb support => enabled
  8. mongodb version => 1.1.8
  9. mongodb stability => stable
  10. libmongoc version => 1.3.5
  11. mongodb.debug => no value => no value
  12.  
  13. sudo pecl install mongodb
  14.  
  15. pecl/mongodb is already installed and is the same as the released version 1.1.8
  16. install failed
  17.  
  18. sudo pecl uninstall mongodb
  19.  
  20. sudo pecl install mongodb
  21.  
  22. <?php
  23.  
  24. echo "I am here";
  25. $connection = new Mongo('localhost');
  26. $db = $connection->mydb;
  27.  
  28. $list = $db->listCollections();
  29. foreach ($list as $collection) {
  30. echo "$collection </br>";
  31. }
  32.  
  33. echo "I am never here";
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement