|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2021-05-12 01:15 UTC] security at paragonie dot com
Description: ------------ Currently, I get the following result when I try to start an interactive session: $ php -a Interactive mode enabled ...but it hangs forever without prompting at all. Using php -r works as expected: $ php -r "echo 'hello world', PHP_EOL;" $ php -v PHP 8.1.0-dev (cli) (built: May 11 2021 21:07:43) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.0-dev, Copyright (c) Zend Technologies The output of `php -r "phpinfo();"` is provided for completeness, although I do not think it's a configuration issue: https://gist.github.com/paragonie-security/92571c1121e4b16e019a82e810643bf6 Test script: --------------- N/A just run `php -a` after building from master PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 22 06:00:02 2025 UTC |
> I've rebuilt it --with-readline and now I'm getting a weird error I don't > understand, but it looks unrelated: It sure does look unrelated, and c945c39 just built successfully for me. Did you reuse the same build directory from before? Did you make clean/git clean it before the second build? > Interestingly, in my copy of PHP 8.0.x (provided by the ondrej packages for > Ubuntu), I see the following prompt: The relevant php_cli.c source [1] has changed some with 8.1, that is true: if (interactive) { if (cli_shell_callbacks.cli_shell_run) { printf("Interactive shell\n\n"); } else { printf("Interactive mode enabled\n\n"); /* Treat as non-interactive apart from the stdin input */ interactive = false; } With 8.0 and before, there were still two messages displayed [2]: "shell" if you had specifically libreadline or libedit support and "mode" if not. What about building the same 8.0.x version yourself? [1] https://github.com/php/php-src/blob/c945c39/sapi/cli/php_cli.c#L876 [2] https://github.com/php/php-src/blob/PHP-8.0.6/sapi/cli/php_cli.c#L867