Code Monkey home page Code Monkey logo

Comments (7)

bjori avatar bjori commented on August 11, 2024

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.

ixqbar avatar ixqbar commented on August 11, 2024
<?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.

bjori avatar bjori commented on August 11, 2024

Thanks!

I've created a Pull Request for this issue:
#152

from mongo-php-driver.

ixqbar avatar ixqbar commented on August 11, 2024

thanks

from mongo-php-driver.

ixqbar avatar ixqbar commented on August 11, 2024

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.

jmikola avatar jmikola commented on August 11, 2024

FYI: This is also being tracked in PHPC-502.

from mongo-php-driver.

derickr avatar derickr commented on August 11, 2024

This is now fixed for the master branch, and will make it into 1.1.

from mongo-php-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.