php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44709 CLI input not passed to executed programs
Submitted: 2008-04-13 03:26 UTC Modified: 2008-10-25 13:21 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: wzed dot php at gmail dot com Assigned:
Status: Not a bug Package: Program Execution
PHP Version: 5.2CVS-2008-04-13 (snap) OS: Windows XP
Private report: No CVE-ID: None
 [2008-04-13 03:26 UTC] wzed dot php at gmail dot com
Description:
------------
When a program is executed via one of PHP's program-execution functions, it is unable to accept input from the command line. This prevents interactive CLI programs from actually being interactive.

I believe this is a regression in PHP 5.2.2, as 5.2.1 and 4.x behave as expected. It may be related to the fix for bug #33664.

Also see bug #41874.

Reproduce code:
---------------
<?php

passthru('pause');

echo "You pressed a key, exiting now";

?>

Expected result:
----------------
C:\>php-5.2.1-Win32\php test.php
Press any key to continue . . .
You pressed a key, exiting now
C:\>

Actual result:
--------------
C:\>php-5.2.2-Win32\php test.php
Press any key to continue . . . ^C
C:\>x

Note: Nothing happens when a key (in this case "x") is pressed. The script hangs until terminated with Ctrl+C.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-25 13:21 UTC] jani@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See also bug #41874
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 12:01:30 2024 UTC