Bug #81033 [Com]: "Interactive Mode" Shell Hangs Indefinitely

From: Date: Wed, 12 May 2021 02:19:23 +0000
Subject: Bug #81033 [Com]: "Interactive Mode" Shell Hangs Indefinitely
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233792@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81033&edit=1 ID: 81033 Comment by: security at paragonie dot com Reported by: security at paragonie dot com Summary: "Interactive Mode" Shell Hangs Indefinitely Status: Feedback Type: Bug Package: *General Issues Operating System: Ubuntu Linux PHP Version: master-Git-2021-05-12 (Git) Block user comment: N Private report: N New Comment: No, I did not --with-readline my ./configure command. Yes, this was from HEAD on the master branch on Github: commit hash c945c399aa8051ae24c727d73c1ea0989f4d14d7 I've rebuilt it --with-readline and now I'm getting a weird error I don't understand, but it looks unrelated: /usr/bin/ld: ext/reflection/php_reflection.o: in function `zim_ReflectionFiber___construct': /home/scott/tmp/php-src/ext/reflection/php_reflection.c:6770: undefined reference to `zend_ce_fiber' /usr/bin/ld: ext/reflection/php_reflection.o: in function `instanceof_function': /home/scott/tmp/php-src/Zend/zend_operators.h:71: undefined reference to `zend_ce_fiber' /usr/bin/ld: ext/reflection/php_reflection.o: in function `zim_ReflectionFiber___construct': /home/scott/tmp/php-src/ext/reflection/php_reflection.c:6779: undefined reference to `zend_ce_fiber' /usr/bin/ld: Zend/zend_execute_API.o: in function `init_executor': /home/scott/tmp/php-src/Zend/zend_execute_API.c:195: undefined reference to `zend_fiber_init' /usr/bin/ld: Zend/zend_default_classes.o: in function `zend_register_default_classes': /home/scott/tmp/php-src/Zend/zend_default_classes.c:42: undefined reference to `zend_register_fiber_ce' collect2: error: ld returned 1 exit status make: *** [Makefile:274: sapi/cli/php] Error 1 > The prompt you're expecting comes after an "Interactive shell" message. Interestingly, in my copy of PHP 8.0.x (provided by the ondrej packages for Ubuntu), I see the following prompt: $ php8.0 -a Interactive mode enabled php > ...Is this "Interactive mode enabled" / "Interactive shell" verbage something new to PHP 8.1? If that discrepancy isn't new, then readline might be a red herring, because it's working as expected when that prompt is displayed. Previous Comments: ------------------------------------------------------------------------ [2021-05-12 02:08:18] requinix@php.net "Interactive mode enabled" means that it is reading from stdin but does not give you a full shell. The prompt you're expecting comes after an "Interactive shell" message. Did you build with readline support? I don't see a --with-readline in your configure command. Or anything else, for that matter. And just in case, what commit did you build from? Was it HEAD within the last ~16 hours? ------------------------------------------------------------------------ [2021-05-12 01:15:48] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81033&edit=1

« previous php.bugs (#233792) next »