ID:               33147
 User updated by:  skissane at iips dot mq dot edu dot au
 Reported By:      skissane at iips dot mq dot edu dot au
 Status:           Open
 Bug Type:         Program Execution
 Operating System: Linux
 PHP Version:      5.0.4
 New Comment:

Looked at ext/standard/proc_open.c, lines 59-63. Found the following
code:

#if 0 && HAVE_PTSNAME && HAVE_GRANTPT && HAVE_UNLOCKPT &&
HAVE_SYS_IOCTL_H && HAVE_TERMIOS_H
# include <sys/ioctl.h>
# include <termios.h>
# define PHP_CAN_DO_PTS 1
#endif


Why is this "#if 0"? Is it broken? The docs state that the feature is
available in PHP 5 or greater. I will try removing the #if 0, and
seeing what happens.


Previous Comments:
------------------------------------------------------------------------

[2005-05-26 07:06:28] skissane at iips dot mq dot edu dot au

Description:
------------
Trying to use Unix98 pty's with proc_open gives error " pty pseudo
terminal is not support on this system in ". But, /dev/ptmx exists, and
devpts is mounted on /dev/pts!

PHP configuration: 

'./configure' '--enable-cli' '--disable-cgi' '--with-xsl'
'--prefix=/usr/local/php-5.0.4/' '--with-dba' '--with-cdb'
'--with-mssql=/usr/local'




Reproduce code:
---------------
<?php
// Create a pseudo terminal for the child process
$descriptorspec = array(
   0 => array("pty"),
   1 => array("pty"),
   2 => array("pty")
);
$process = proc_open("ls -l /", $descriptorspec, $pipes);
if (is_resource($process)) {
        echo "OK!";
}
else {
        echo "FAIL!";
}
?>


Expected result:
----------------
OK!

Actual result:
--------------
Warning: proc_open(): pty pseudo terminal is not support on this system
in /home/skissane/php-5.0.4/ptytest.php on line 8
FAIL!



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33147&edit=1

Reply via email to