tags:

views:

399

answers:

1

Hi,

I followed the windows installation instructions in mongodb'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

+2  A: 

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

VolkerK
yes, i've upgraded to 5.3 and downloaded the driver with 5.3 on it and it worked. how did you know that it was compiled for 5.3?
mdm414
`with module API=20090626` that's the api number for php 5.3. `PHP compiled with module API=20060613` that's the number for php 5.2. Take a look at the `#define ZEND_MODULE_API_NO` line in the different versions of zend_modules.h at http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_modules.h?view=log
VolkerK
Cool! Thanks for the info.
mdm414