Musl based full static linked php-cli executable cannot use `-a` option
未关闭
@devnexen 已经在做这个了。
开始于 2025年9月19日。
Bug
Extension: readline
Status: Needs Triage
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.2k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
The following code:
./php -a
Resulted in this output:
Interactive shell (-a) requires the readline extension.
But I expected this output instead:
Interactive shell
php >
Other information:
$ ./php --ri readline
readline
Readline Support => enabled
Readline library => 8.3
Directive => Local Value => Master Value
cli.pager => no value => no value
cli.prompt => \b \> => \b \>
Related PR: https://github.com/php/php-src/pull/19746
I tried to fix this by uncommenting old code in that PR, but it breaks default shared build. Looks like the readline extension's -a interactive function depends on cli SAPI, but if we use statically links, it will make other SAPI failed to build.
This binary is built by static-php-cli in alpine linux, and without specific patches on it. I'm open to provide more information if needed.
PHP Version
PHP 8.4.12 (cli) (built: Sep 16 2025 02:30:10) (NTS gcc 14.2.0)
Copyright (c) The PHP Group
Built by static-php-cli 2.7.4
Zend Engine v4.4.12, Copyright (c) Zend Technologies
with Zend OPcache v8.4.12, Copyright (c), by Zend Technologies
Operating System
Alpine Linux (edge)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。