首页  >  文章  >  后端开发  >  php 添加mongodb扩展

php 添加mongodb扩展

巴扎黑
巴扎黑原创
2016-11-12 13:42:561228浏览

PHP MongoDB 扩展安装 
[root@a5139 ~]# wget http://pecl.php.net/get/mongo-1.3.4.tgz 
[root@a5139 ~]# tar zxvf mongo-1.3.4.tgz 
[root@a5139 ~]# cd mongo-1.3.4 
[root@a5139 mongo-1.3.4]# /usr/local/php/bin/phpize 
Configuring for: 
PHP Api Version: 20041225 
Zend Module Api No: 20060613 
Zend Extension Api No: 220060519 
[root@a5139 mongo-1.3.4]# ./configure –with-php-config=/usr/local/php/bin/php-config 
[root@a5139 mongo-1.3.4]# make && make install 
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/ 

[root@a5139 mongo-1.3.4]# ls /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/ 
memcache.so mongo.so pdo_mysql.so 
[root@a5139 mongo-1.3.4]# vi /usr/local/php/etc/php.ini 
#加入 

extension_dir = “/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/” 
#extension = “memcache.so” 
#extension = “pdo_mysql.so” 
extension = “mongo.so” 

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn