[ACCEPTED]-PHP Fatal error: Class 'MongoDate' not found-lithium
Accepted answer
For people that have come here using PHP7, the 4 classs has been renamed:
MongoDate
is now MongoDB\BSON\UTCDateTime
Also I've 3 found that this now wants miliseconds instead of seconds, so 2 make sure you multiple your input by 1000, for 1 example:
$date = new \MongoDB\BSON\UTCDateTime(strtotime('yesterday') * 1000);
Make sure your mongodb
extension is loaded.
var_dump(extension_loaded('mongodb'));
If not, you 1 must load it in php.ini
.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.