I\'m trying to execute this:
But I get the following error:
Fatal error: Cl
Check out the exact compiler name of your PHP binary in phpinfo page and try to reinstall the mongo driver was built on same compiler.
http://www.php.net/manual/en/mongo.installation.php#mongo.installation.windows
You're using the mongo driver was bulit on Visual Studio 6 with Thread-safe, now. ( vs6ts means it )
Similar problem was caused by compiler issue;
http://www.php.net/manual/en/mongo.installation.php#104223
The problem was the PHP driver (php_mongo.dll
). Apache/WAMP just did not like the mongo-1.1.4-php5.3vc6ts
version for some reason. My Windows 7 Professional machine had the mongo-1.2.5-php5.3vc9ts
version. That was the only difference between the two machines.
I originally had been using the mongo-1.2.5-php5.3vc9ts
version of the driver on the Windows 7 Enterprise machine but changed to the mongo-1.1.4-php5.3vc6ts
version when I was troubleshooting the problem. So the original problem could actually just have been that the database path data\db
didn't exist/couldn't be found (and needed to be specified using --dbpath
when running/starting mongod.exe
).
On Ubuntu, I used this tutorial . Once installed, echo the phpinfo() and check if the mongo.ini file is located in the correct directory mentioned in phpinfo with 'Scan this dir for additional .ini files'
If this problem exist in php CLI you should add extension=mongo.so
to your /etc/php5/cli/php.ini
file