V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
mentalidade
V2EX  ›  程序员

关于 PHP 的 mongo 拓展?

  •  
  •   mentalidade · 2018-09-27 14:21:18 +08:00 · 2373 次点击
    这是一个创建于 2240 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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);
    
    
    2 条回复    2018-09-27 14:35:53 +08:00
    revlis7
        1
    revlis7  
       2018-09-27 14:27:32 +08:00
    新的是: https://pecl.php.net/package/mongodb

    注意名字别搞混了
    mentalidade
        2
    mentalidade  
    OP
       2018-09-27 14:35:53 +08:00
    @revlis7 #1 谢谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1040 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 22:17 · PVG 06:17 · LAX 14:17 · JFK 17:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.