Req #33147 [Com]: proc_open(): "pty pseudo terminal not supported on this system"

From: Date: Mon, 12 May 2014 11:33:36 +0000
Subject: Req #33147 [Com]: proc_open(): "pty pseudo terminal not supported on this system"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185777@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=33147&edit=1 ID: 33147 Comment by: gescheit at list dot ru Reported by: skissane at iips dot mq dot edu dot au Summary: proc_open(): "pty pseudo terminal not supported on this system" Status: Open Type: Feature/Change Request Package: *General Issues Operating System: * PHP Version: 5CVS-2005-05-27 Block user comment: N Private report: N New Comment: Sadly, but "bug" still present. This code can be used for pty checking: #include <stdio.h> #include <termios.h> #include <unistd.h> #include <pty.h> int main(int argc, char** argv) { int master; int slave; return openpty(&master,&slave,NULL,NULL,NULL); } Previous Comments: ------------------------------------------------------------------------ [2006-02-14 11:28:26] justinhead at insightbb dot com You can use basic shell tools to test system pty piping. The following works on FreeBSD 6.0 but you may have to change the names of your pty/tty devices for other unixes. Open up two terminal sessions and become root in both. In the first one type: ping localhost | tee /dev/ptyp9 In the second one type: cat < /dev/ttyp9 Thats it. If pty's are working you should start seeing the output of the ping command scroll by in both terminals. ------------------------------------------------------------------------ [2005-07-14 08:57:44] sniper@php.net I'm still waiting for someone to give me a short and reliable piece of code (shell or C) to test if the functionality is present on the system.. ------------------------------------------------------------------------ [2005-06-20 09:51:30] skissane at iips dot mq dot edu dot au This is not really a feature/change request -- the feature is already supported in the code; the configure system just needs to be set up so the support can be turned on/off. ------------------------------------------------------------------------ [2005-05-30 08:20:43] skissane at iips dot mq dot edu dot au Updated test case: added SKIPIF (requires Michael Spector's --enable-pty patch). --TEST-- Bug #33147 (proc_open: basic test of Unix98 PTYs functionality) --SKIPIF-- <?php ob_start(); phpinfo(); $info = ob_get_contents(); ob_end_clean(); if (strpos($info,"--enable-pty") === FALSE) { die("skip --enable-pty not specified\n"); } ?> --FILE-- <?php // Create a pseudo terminal for the child process $descriptorspec = array( 0 => array("pty"), 1 => array("pty"), 2 => array("pty") ); $process = proc_open("echo this is working", $descriptorspec, $pipes); if (is_resource($process)) { echo "OK\n"; while (!feof($pipes[1])) echo fread($pipes[1],1024); } ?> --EXPECT-- OK this is working ------------------------------------------------------------------------ [2005-05-30 03:07:59] skissane at iips dot mq dot edu dot au Wez (or someone else with CVS comitter rights): why not just check Michael Spector's patch into CVS? http://www.mail-archive.com/internals@lists.php.net/msg14854.html. That should close this issue. No more of your time required :) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=33147 -- Edit this bug report at https://bugs.php.net/bug.php?id=33147&edit=1

« previous php.bugs (#185777) next »