开发者

PHP can't connect to Mongodb

开发者 https://www.devze.com 2022-12-26 14:41 出处:网络
I followed the windows installation instructions in mongodb开发者_如何学Go\'s website but I still can\'t connect to MongoDB through PHP because of this error:

I followed the windows installation instructions in mongodb开发者_如何学Go's website but I still can't connect to MongoDB through PHP because of this error:

Class 'Mongo' not found

Why isn't the file containing the Mongo Class not being loaded?

I've also found this error:

PHP Warning: PHP Startup: mongo: Unable to initialize module Module compiled with module API=20090626, debug=0, thread-safety=1 PHP compiled with module API=20060613, debug=0, thread-safety=1 These options need to match in Unknown on line 0

I'm using php 5.2.5 and the mongo-php-driver is Windows PHP 5.2 VC6 thread safe

Thanks


The driver was compiled for php 5.3 though the name suggests otherwise.
Can you upgrade to php 5.3(.2) ?


On archlinux, Installing php-mongo 1.2.10-1 solved this problem for me.

0

精彩评论

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

关注公众号