Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PHP: proc_open persistent file pointers

Name: Anonymous 2006-04-07 16:32

Is there a way to make the file streams returned by proc_open() persistent between page loads so I can make a PHP style interface to a terminal program?

Looking over the php functions it seems possible to make persistent pointers with stream_socket_client(<URL>, STREAM_CLIENT_PERSISTENT). But I don't think its possible to make a pointer to a terminal using a URL schema.

The other thing I can think of is to make a small C program to pipe output from stdin to a network socket and have PHP communicate with that.

Name: Anonymous 2006-04-08 4:07

>>2
I tried using dtach with proc_open() and passthru(). I can't use pty because I'm on Debian with php4 and you need php5 to use pty. Using pipes I get dtach errors like:

dtach: tcgetattr: Inappropriate ioctl for device

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List