Closed hex0wn closed 5 years ago
原因是在 mysqli
扩展中会以 class name 作为 key 存储部分 properties
REGISTER_MYSQLI_CLASS_ENTRY("mysqli_driver", mysqli_driver_class_entry, mysqli_driver_methods);
ce = mysqli_driver_class_entry;
zend_hash_init(&mysqli_driver_properties, 0, NULL, free_prop_handler, 1);
MYSQLI_ADD_PROPERTIES(&mysqli_driver_properties, mysqli_driver_property_entries);
zend_declare_property_null(ce, "client_info", sizeof("client_info") - 1, ZEND_ACC_PUBLIC);
zend_declare_property_null(ce, "client_version", sizeof("client_version") - 1, ZEND_ACC_PUBLIC);
zend_declare_property_null(ce, "driver_version", sizeof("driver_version") - 1, ZEND_ACC_PUBLIC);
zend_declare_property_null(ce, "embedded", sizeof("embedded") - 1, ZEND_ACC_PUBLIC);
zend_declare_property_null(ce, "reconnect", sizeof("reconnect") - 1, ZEND_ACC_PUBLIC);
zend_declare_property_null(ce, "report_mode", sizeof("report_mode") - 1, ZEND_ACC_PUBLIC);
ce->ce_flags |= ZEND_ACC_FINAL;
zend_hash_add_ptr(&classes, ce->name, &mysqli_driver_properties);
因为之前修复和 opcache 冲突的 bug #3 所以选择了既更改了 hash 表内的 key 名字,也更改了 functions/classes 内部的名字,这里需要考虑以下如何修复。。。
简单过了一下 opcache 扩展,应该不需要修改 ce->name,所以将之前的修过给删除了,目前应该没有问题了,@hex0wn 感谢提交 issue,如果还有问题可以继续提交。
配置好prvd后发现数据库的server_info属性无法获取到,并且打印link时会触发段错误
xmark配置如下: