php / php/php-src

Musl based full static linked php-cli executable cannot use `-a` option

オープン
#19,871 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

@devnexen がすでに取り組んでいます。

2025年9月19日 から。

Bug Extension: readline Status: Needs Triage
主要言語
C
スター
40.4k
フォーク
8.1k
平均マージ
2日 13時間
マージ済み PR(30日)
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)

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。