Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To be able to debug "random weirdness" like this, it is very useful to turn on the internal driver logging. The driver does whole lot of things behind the scenes, and can spit out all sort of important debug information.</p> <p>Add the following at the top of your script:</p> <pre><code>&lt;?php MongoLog::setLevel(MongoLog::ALL); MongoLog::setModule(MongoLog::ALL); ?&gt; </code></pre> <p>By default the logger will spew out "php error messages" (E_NOTICE/E_WARNING), if you have error_log enabled, make sure to check that file for the results.</p> <p>For your (slightly modified) connection string, I get the following results</p> <pre><code>Notice: PARSE INFO: Parsing mongodb://theAdmin:Gold1234@localhost:27027 in Command line code on line 1 Notice: PARSE INFO: - Found user 'theAdmin' and a password in Command line code on line 1 Notice: PARSE INFO: - Found node: localhost:27027 in Command line code on line 1 Notice: PARSE INFO: - Connection type: STANDALONE in Command line code on line 1 Notice: PARSE INFO: - No database name found for an authenticated connection. Using 'admin' as default database in Command line code on line 1 Notice: CON INFO: mongo_get_read_write_connection: finding a STANDALONE connection in Command line code on line 1 Notice: CON INFO: connection_create: creating new connection for localhost:27027 in Command line code on line 1 Notice: CON WARN: connection_create: error while creating connection for localhost:27027: Invalid argument in Command line code on line 1 Notice: CON WARN: Couldn't connect to 'localhost:27027': Invalid argument in Command line code on line 1 </code></pre> <p>I suspect a firewall issue at either end.. Can you connect to the server using the mongo shell?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload