PHP Fatal error: Call to undefined function bson encode()

(Fatal error: Call to undefined function bson encode()에서 넘어옴)
Fatal error: Call to undefined function bson_encode()

1 문제상황[ | ]

[root@zetawiki ~]# php -r "bson_encode();"
PHP Fatal error:  Call to undefined function bson_encode() in Command line code on line 1

Fatal error: Call to undefined function bson_encode() in Command line code on line 1

2 해결방법[ | ]

[root@zetawiki ~]# pecl install mongo
... (생략)
Build process completed successfully
Installing '/usr/lib64/php/modules/mongo.so'
install ok: channel://pecl.php.net/mongo-1.4.5
configuration option "php_ini" is not set to php.ini location
You should add "extension=mongo.so" to php.ini
[root@zetawiki ~]# echo "extension=mongo.so" > /etc/php.d/mongo.ini
[root@zetawiki ~]# php -m | grep mongo
mongo
[root@zetawiki ~]# php -r "bson_encode();"
PHP Warning:  bson_encode() expects exactly 1 parameter, 0 given in Command line code on line 1

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}