I'm getting this error when trying to connect to a mongo server:
Unable to find the wrapper "mongodb" - did you forget to enable it when you configured PHP?
The connection string looks like this:
$conn = new Mongo("mongodb://XXXX:XXXX@XXX.member0.mongohq.com:10021/XXX",array("replicaSet" => 'rsname'));
I tried finding out qhat wrappers were available using:
var_dump(stream_get_wrappers());
and got the following:
array
0 => string 'https' (length=5)
1 => string 'ftps' (length=4)
2 => string 'compress.zlib' (length=13)
3 => string 'compress.bzip2' (length=14)
4 => string 'php' (length=3)
5 => string 'file' (length=4)
6 => string 'glob' (length=4)
7 => string 'data' (length=4)
8 => string 'http' (length=4)
9 => string 'ftp' (length=3)
10 => string 'phar' (length=4)
11 => string 'zip' (length=3)
12 => string 'ssh2.shell' (length=10)
13 => string 'ssh2.exec' (length=9)
14 => string 'ssh2.tunnel' (length=11)
15 => string 'ssh2.scp' (length=8)
16 => string 'ssh2.sftp' (length=9)
I've checked the conf.d folders and they all seem to be in order form what I can see, so i'm not sure what I need to do to allow me to connect using the wrapper, as the example shows in the php docs example.
I'm running nginx / PHP 5.3.5-1ubuntu7.11
Ha anyone delat with this before, or able to offer some guidance? Thanks.