简体   繁体   English

无法使用 PHP 7.3 安装 RAR 扩展

[英]can't Installing RAR extention with PHP 7.3

I'm trying to install the rar package.我正在尝试安装 rar 包。 I checked php.net's installation docs and it just said to execute pecl -v install rar我检查了 php.net 的安装文档,它只是说执行 pecl -v install rar

/tmp/pear/temp/rar/rararch.c:34: note: this is the location of the previous definition
 #define _GNU_SOURCE

/tmp/pear/temp/rar/rararch.c: In function ‘rararch_it_get_iterator’:
/tmp/pear/temp/rar/rararch.c:961:25: error: ‘zend_class_entry’ {aka ‘struct _zend_class_entry’} has no member named ‘iterator_funcs’; did you mean ‘iterator_funcs_ptr’?
  it->parent.funcs = ce->iterator_funcs.funcs;
                         ^~~~~~~~~~~~~~
                         iterator_funcs_ptr
/tmp/pear/temp/rar/rararch.c: In function ‘minit_rararch’:
/tmp/pear/temp/rar/rararch.c:1173:18: error: ‘zend_class_entry’ {aka ‘struct _zend_class_entry’} has no member named ‘iterator_funcs’; did you mean ‘iterator_funcs_ptr’?
  rararch_ce_ptr->iterator_funcs.funcs = &rararch_it_funcs;
                  ^~~~~~~~~~~~~~
                  iterator_funcs_ptr
make: *** [Makefile:198: rararch.lo] Error 1
rolling back 441 file operations
ERROR: `make' failed

how can install rar extension with php 7.3 on debian 10?如何在 debian 10 上使用 php 7.3 安装 rar 扩展?

Quoting comment from https://www.php.net/rar引用来自https://www.php.net/rar 的评论

Officially it support only php 5.3 to 7.1.官方它只支持 php 5.3 到 7.1。 With some luck it works on some 7.2 versions.幸运的是,它适用于某些 7.2 版本。 The bug reports on the rar pecl-site aren't modified for years. rar pecl 站点上的错误报告多年未修改。 I think this documentation on php.net should be removed, rar support is dead我认为应该删除 php.net 上的此文档,rar 支持已死

Other way to do this:其他方法来做到这一点:

shell_exec("unrar x $pathToRar $dirToExtractTo"); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM