php / php/php-src

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

Aperta
#19,871 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@devnexen ci sta già lavorando.

Dal 19/9/2025.

Bug Extension: readline Status: Needs Triage
Lingua principale
C
Stelle
40.4k
Fork
8.1k
Merge medio
2g 13h
PR unite (30g)
96

Descrizione

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)

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.