关于 PHP 的 mongo 拓展?

2018-09-27 14:21:18 +08:00
 mentalidade

https://pecl.php.net/package/mongo

1.显示 This package has been superseded, but is still maintained for bugs and security fixes. 这个包被取代了,那么新的是什么?

2.编译安装的时候,前面没问题,make && make install 时候报错,谷歌不出来,不知道为啥,然后使用 pecl install mongodb安装好了。错误如下:

/data/installed/mongo-php-driver-legacy/php_mongo.h:197:1: error: unknown type name 'zend_object_value'
 zend_object_value php_mongo_type_object_new(zend_class_entry *class_type TSRMLS_DC);
 ^
/data/installed/mongo-php-driver-legacy/php_mongo.h:201:1: error: unknown type name 'zend_literal'
 void mongo_write_property(zval *object, zval *member, zval *value, const zend_literal *key TSRMLS_DC);
 ^
/data/installed/mongo-php-driver-legacy/php_mongo.h:207:1: error: unknown type name 'zend_literal'
 zval *mongo_read_property(zval *object, zval *member, int type, const zend_literal *key TSRMLS_DC);
 ^
In file included from /data/installed/mongo-php-driver-legacy/php_mongo.c:24:0:
/data/installed/mongo-php-driver-legacy/mongoclient.h:19:1: error: unknown type name 'zend_object_value'
 zend_object_value php_mongoclient_new(zend_class_entry *class_type TSRMLS_DC);
 ^
In file included from /data/installed/mongo-php-driver-legacy/php_mongo.c:43:0:
/data/installed/mongo-php-driver-legacy/types/id.h:19:52: error: unknown type name 'zend_uint'
 int php_mongo_id_serialize(zval*, unsigned char**, zend_uint*, zend_serialize_data* TSRMLS_DC);

2388 次点击
所在节点    程序员
2 条回复
revlis7
2018-09-27 14:27:32 +08:00
新的是: https://pecl.php.net/package/mongodb

注意名字别搞混了
mentalidade
2018-09-27 14:35:53 +08:00
@revlis7 #1 谢谢

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/493153

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX