PHP Fatal error: Class 'MongoClient' not found
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php-mongo (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
==== Sample code ====
<?php
$m = new MongoClient();
==== ERR MSG ====
PHP Fatal error: Class 'MongoClient' not found in sample.php
==== PHP Configuration ====
$ php --ini
Configuration File (php.ini) Path: /etc/php5/cli
Loaded Configuration File: /etc/php5/
Scan for additional .ini files in: /etc/php5/
Additional .ini files parsed: /etc/php5/
/etc/php5/
$ php --info | grep mongo
/etc/php5/
mongo
mongo.allow_
mongo.allow_
mongo.chunk_size => 262144 => 262144
mongo.cmd => $ => $
mongo.default_host => localhost => localhost
mongo.default_port => 27017 => 27017
mongo.is_
mongo.long_
mongo.native_long => 0 => 0
mongo.no_id => 0 => 0
mongo.ping_interval => 5 => 5
mongo.utf8 => 1 => 1
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: php5-mongo 1.2.12-1
ProcVersionSign
Uname: Linux 3.5.0-21-generic i686
ApportVersion: 2.6.1-0ubuntu9
Architecture: i386
Date: Sun Jan 6 21:10:37 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-01-06 (0 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release i386 (20121017.2)
MarkForUpload: True
SourcePackage: php-mongo
UpgradeStatus: No upgrade log present (probably fresh install)
description: | updated |
Changed in php-mongo (Ubuntu): | |
status: | New → Incomplete |
status: | Incomplete → New |
Your driver version is too low: 1.2.12
The "MongoClient" starts from 1.3.0
Update your mongo driver with "pecl install mongo"