开发者

Can't read mongodb data with PHP

开发者 https://www.devze.com 2023-02-04 21:29 出处:网络
I\'ve just started my adventure with mongodb and found some problems, I can\'t get by with: when I create new collection with PHP and put s开发者_开发百科ome example data here, it saves, so I have po

I've just started my adventure with mongodb and found some problems, I can't get by with:

when I create new collection with PHP and put s开发者_开发百科ome example data here, it saves, so I have possibility to show it in mongo console (however PHP execution still works, and is not going to stop(?) ), but when I want to get my data back by PHP there (doesn't matter if the same sript or the other one), it starts to execute, execute and execute with no visual result.

Do you maybe have any idea, why something like that happens? Config: xampp (php5.3) @ windows + php_mongo.dll


Check to make sure the mongodb server is running properly as well in the services, sounds like it may not be started. Are you testing to make sure your collection is really being saved?

Make sure you check for the last error even when you try to save the collection and insert data to see where your error is actually happening

http://php.net/manual/en/mongodb.lasterror.php

0

精彩评论

暂无评论...
验证码 换一张
取 消