我一直在爲今天下午的大部分時間安裝MongoDB PHP驅動程序。MongoDB PHP驅動程序安裝(OS X El Capitan)
我使用的PHP版本爲5.5,我已經使用brew install php55-mongo
安裝了MongoDB PHP驅動程序(儘管我之前嘗試過其他方法)。問題是,每當我嘗試使用MongoClient()
我得到的錯誤:
Class 'MongoClient' not found
當我運行php -m
模塊「蒙戈」上市,但我也得到了以下警告:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php55/5.5.34/lib/php/extensions/no-debug-non-zts-20121212/mongo.so' - dlopen(/usr/local/Cellar/php55/5.5.34/lib/php/extensions/no-debug-non-zts-20121212/mongo.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php55/5.5.34/lib/php/extensions/no-debug-non-zts-20121212/mongo.so' - dlopen(/usr/local/Cellar/php55/5.5.34/lib/php/extensions/no-debug-non-zts-20121212/mongo.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php55-mongodb/mongodb.so' - dlopen(/usr/local/opt/php55-mongodb/mongodb.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php55-mongodb/mongodb.so' - dlopen(/usr/local/opt/php55-mongodb/mongodb.so, 9): image not found in Unknown on line 0
的當我使用phpinfo()
或get_loaded_extensions()
時,模塊未列出。
任何想法?