Rahul Rahul - 1 year ago 139
PHP Question

PHP Mongo Cursor loop fails with exception "Could not convert BSON document to a PHP variable"

I am getting following cursor exception while looping from new PHP driver...


"Could not convert BSON document to a PHP variable"


It works well with old PHP drivers.

Answer Source

I got the issue, it was due to bad corrector inside key of Mongodb document.. sample key: "PR´┐ŻNO"...

Old PHP-Mongo driver handling it well but new driver version 1.1.8 throwing exception "Could not convert BSON document to a PHP variable"....

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download