php - Fatal Error - 'Mongo' class not found -
php - Fatal Error - 'Mongo' class not found -
i'm trying execute this:
<?php // connect $m = new mongo(); ?>
but next error:
fatal error: class 'mongo' not found in c:\wamp\www.....
info: php: 5.38 mongodb: mongodb-win32-i386-2.0.2 mongodb php driver: mongo-1.1.4-php5.3vc6ts wampserver: 2.2 os: windows 7 enterprise sp1i've followed mongodb installation fine (incl. adding dll ext & php.ini), i've started mongod.exe , wamp running.
what imply missing/incorrect? edit:i have got running on windows 7 machine (windows 7 profressional). got me curious. windows 7 enterprise sp1 machine has same http.conf
, php.ini
, c:\wamp\bin\mongodb
contents (therefore dbs exact same) , exact same batch file start mongod.exe
win7 professional machine.
but still, can on win7 enterprise sp1 machine connect via command line. win7 professional machine's phpinfo()
contains: win7 enterprise sp1 machine doesn't contain reference mongodb.
the contents of batch file utilize start mongodb:
"c:\wamp\bin\mongodb\bin\mongod.exe" --logpath "c:\wamp\bin\mongodb\logs\error.log" --logappend --dbpath "c:\wamp\bin\mongodb\data\db" --directoryperdb --service net start "mongodb" pause
the problem php driver (php_mongo.dll
). apache/wamp did not mongo-1.1.4-php5.3vc6ts
version reason. windows 7 professional machine had mongo-1.2.5-php5.3vc9ts
version. difference between 2 machines.
i had been using mongo-1.2.5-php5.3vc9ts
version of driver on windows 7 enterprise machine changed mongo-1.1.4-php5.3vc6ts
version when troubleshooting problem. original problem have been database path data\db
didn't exist/couldn't found (and needed specified using --dbpath
when running/starting mongod.exe
).
php apache mongodb installation wamp
Comments
Post a Comment