Comments (7)
Can you run your application with debug logging enabled and post it?
If its a comand line script do:
php -dmongodb.debug=stderr myscript.php
Or if it is a webapp, you'll have to ini_set("mongodb.debug", "/tmp/");
and run the script.
That will create a file called PHONGO-....
in /tmp/
from mongo-php-driver.
<?php
require dirname(__DIR__) . '/vendor/autoload.php';
$manager = new MongoDB\Driver\Manager("mongodb://192.168.1.41:27017");
$collection = new MongoDB\Collection($manager, "apple_guru_server_101.player");
$player_data = $collection->findOne();
print_r($player_data);
12:20:04:xingqiba:~/workspace/php/php5/test @_@ php -dmongodb.debug=stderr test_mongo.php
[2015-12-07T04:20:20+00:00] PHONGO: DEBUG > Connection string: 'mongodb://192.168.1.41:27017'
[2015-12-07T04:20:20+00:00] PHONGO: TRACE > ENTRY: php_phongo_make_mongo_client():1729
[2015-12-07T04:20:20+00:00] PHONGO: DEBUG > Creating Manager, phongo-1.0.0[stable] - mongoc-1.2.0(bundled), libbson-1.2.0(bundled), php-5.5.28
[2015-12-07T04:20:20+00:00] mongoc: TRACE > ENTRY: mongoc_topology_description_init():51
[2015-12-07T04:20:20+00:00] mongoc: TRACE > EXIT: mongoc_topology_description_init():67
[2015-12-07T04:20:20+00:00] mongoc: TRACE > ENTRY: mongoc_server_description_init():88
[2015-12-07T04:20:20+00:00] mongoc: TRACE > EXIT: mongoc_server_description_init():122
[2015-12-07T04:20:20+00:00] cluster: TRACE > ENTRY: mongoc_cluster_init():1523
[2015-12-07T04:20:20+00:00] cluster: TRACE > EXIT: mongoc_cluster_init():1546
[2015-12-07T04:20:20+00:00] client: DEBUG > Using custom stream initiator.
[2015-12-07T04:20:20+00:00] PHONGO: TRACE > EXIT: php_phongo_make_mongo_client():1797
/Users/xingqiba/data/softs/mongodb-1.0.0/src/libbson/src/bson/bson.c:1825 bson_init_static(): precondition failed: data
Abort trap: 6
12:20:20:xingqiba:~/workspace/php/php5/test @_@ php -v
PHP 5.5.28 (cli) (built: Aug 25 2015 19:45:08) (DEBUG)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans
from mongo-php-driver.
Thanks!
I've created a Pull Request for this issue:
#152
from mongo-php-driver.
thanks
from mongo-php-driver.
i also test it use php7 and jmikola PR
https://github.com/jmikola/mongo-php-driver.git (php7 branch)
with your pull request is ok
from mongo-php-driver.
FYI: This is also being tracked in PHPC-502.
from mongo-php-driver.
This is now fixed for the master branch, and will make it into 1.1.
from mongo-php-driver.
Related Issues (20)
- l
- apache stop when I added extension=mongodb.so to php.ini HOT 3
- `selectServer` takes too long on official php base image (connections opened sequentially) HOT 13
- libbson Bug Report : variable ret value type error HOT 8
- No suitable servers found (`serverSelectionTryOnce` set) when rs.initiate with localhost HOT 5
- Extract mongodb-1.6.2.tgz error HOT 5
- Sporadic "Authentication failed" errors HOT 8
- MongoDB PHP Driver 1.15+ increases PHP memory consumption HOT 7
- Error while compiling on macOS HOT 7
- Major slowdown since version 1.17.0 HOT 8
- PHP Warning: PHP Startup: Unable to load dynamic library 'mongodb.so' HOT 2
- MongoDB reporting "AuthenticationAbandoned: Overridden by new authentication session" for a PHP client HOT 14
- Windows build after 1.13.0 HOT 4
- linux general protection fault , sorry for my poor english HOT 1
- PHP refusing to load MongoDB PHP driver on Windows (on one machine but not another) HOT 1
- Can't download desired extension HOT 2
- Unable to install pecl mongodb-1.15.1 in php 8.2 HOT 1
- Bug & Question: How to compile mongodb statically into PHP? HOT 9
- PHPStorm Stub for Manager class has outdated signature HOT 1
- Cannot install with laravel 11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongo-php-driver.