php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48900 passthru not pass stdin to the process
Submitted: 2009-07-12 23:57 UTC Modified: 2009-07-13 10:48 UTC
From: fherrero at noticiasdenavarra dot com Assigned:
Status: Not a bug Package: Program Execution
PHP Version: 5.2.10 OS: Windows
Private report: No CVE-ID: None
 [2009-07-12 23:57 UTC] fherrero at noticiasdenavarra dot com
Description:
------------
Windows XP/2003/2008/Vista

PHP => 5.2.4 (5.2.4, 5.2.5, 5.2.6, 5.2.9, 5.2.10 and 5.3.0 tested)

When execute passthru('pause') in cmd windows whith php-cli, 'pause' is executed but php not pass stdin to 'pause': the script is paused forever.

Whith PHP 5.2.0 its works fine.

Cuando se ejecuta passthru('pause') en una ventana de comandos con php-cli, la pausa se produce pero php no pasa la entrada est?ndar al proceso: el script se queda eternamente en pausa.

Reproduce code:
---------------
<?php
echo 'Vamos a pausar el script, para reanudarlo pulse una tecla', "\n";
echo 'Script is paused, press a key for continue', "\n";
passthru('pause');
echo 'Seguimos el script', "\n";
echo 'Script is continued';
?>

Expected result:
----------------
Vamos a pausar el script, para reanudarlo pulse una tecla
Script is paused, press a key for continue

Presione una tecla para continuar . . . ['Press any key to continue' echoed by pause command, script is paused until key is pressed]

Seguimos el script
Script is continued


[

Actual result:
--------------
Vamos a pausar el script, para reanudarlo pulse una tecla
Script is paused, press a key for continue

Presione una tecla para continuar . . . ['Press any key to continue' echoed by pause command, script is paused forever]


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-13 10:48 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 bug #44709 and bug #41874 (fixed in 5.3+)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 09:01:28 2024 UTC