Questions tagged [proc-open]
158 questions
2
votes
1 answer
Connect pipes of processes in php
I would like the output of one process created with proc_open to be piped to another one created with proc_open (in php). For example. In bash I can do:
[herbert@thdev1 ~]$ cat foo
2
3
1
[herbert@thdev1 ~]$ cat foo | sort
1
2
3
[herbert@thdev1 ~]$…

Herbert
- 5,279
- 5
- 44
- 69
2
votes
1 answer
PHP stream_select doesnt work
I'm using Windows 7 and php 5.
I have a problem with executing a process by proc_open and check the timeout.
I used stream_select to check the timeout with this code:
array("file", $infile, "r"), // stdin is a…

박수찬
- 21
- 1
2
votes
1 answer
Multiple input with proc_open()
I'm currently working on an online program. I'm writing a php script that executes a command in the command line with proc_open() (under Linux Ubuntu). This is my code so far:
array("pipe",…

Devos50
- 2,025
- 4
- 25
- 56
2
votes
1 answer
always blocked on reading from pipe opened through php's proc_open when used with stream_select
I'm talking to a process requiring user interaction using the following (PHP 5.3/ Ubuntu 12.04),
$pdes = array(
0 => array('pipe', 'r'), //child's stdin
1 => array('pipe', 'w'), //child's stdout
);
$process = proc_open($cmd, $pdes,…

toofast1227
- 160
- 1
- 15
2
votes
1 answer
Passing interactive arguments for PHP exec() method
Need a help to implement the following. I have a C program file as follows:
#include
main()
{
int x;
int args;
printf("Enter an integer: ");
if (( args = scanf("%d", &x)) == 0) {
printf("Error: not an integer\n");
} else…

user1405309
- 397
- 1
- 4
- 11
2
votes
1 answer
proc_open interaction
Here's what I'm trying to achieve: open a shell (korn or bash, doesn't matter), from that shell, I want to open a ssh connection (ssh user@host). At some point it is likely to happen I will be prompted for either a password or I might be asked…

Elias Van Ootegem
- 74,482
- 9
- 111
- 149
1
vote
1 answer
Using php proc_open() with multiple input streams. Preventing hangs
Seems like I'm having problems using the streams which are piped to a process when using the proc_open() php function.
The process I'm starting is simply the convert ImageMagick utility to compose 3 images on top of each other. When only 1 input…

CodeFan
- 89
- 1
- 10
1
vote
0 answers
while using proc_open(), my time stamp to terminate the function is not working properly
I am having issues with my php code. I am executing c++rom fffff code using proc_open() in php.
//from another function I'm calling this function with parameters execute("code.exe", $STDIN, 0.02, 268435456 * 2);
//my c++ code is already executed to…

Mihail Kostov
- 11
- 1
1
vote
2 answers
PHP Execute with > - Close
i try to make this:
";
exec("echo Hallo > /tmp/testtt.txt", $output, $retval);
echo "Rückgabe mit Status $retval und Ausgabe:\n
"; foreach($output as &$s){ echo $s."
"; } echo…
"; foreach($output as &$s){ echo $s."
"; } echo…

Jan Lahr-Kuhnert
- 21
- 2
1
vote
1 answer
PHP only able to kill process when run in cli
I have this php script "start_stream.php", which starts a process (ffmpeg) using proc_open() and then stays in a loop checking for a keep-alive signal.
Once the keep-alive signal is too old, the php script will terminate the process by its pID with…

Pjottur
- 632
- 9
- 22
1
vote
0 answers
Proc_Open in PHP and Pipes
This is a source code to control a minecraft server over a web interface with a MySQL server.
Everything works fine except of line 29, which doesn't seem to be executed. there simply doesn't appear anything in the servers cin. Also there doesn't…

Prior
- 11
- 2
1
vote
2 answers
Laravel 6.18.2: The Process class relies on proc_open, which is not available on your PHP installation
I used cron job to do some CRUD operation using laravel Task Scheduling. On localhost it is working fine. But on my shared host I keep getting this error.
2020-04-08 16:56:01] local.ERROR: The Process class relies on proc_open, which is not…

Shuvo Joseph
- 894
- 1
- 12
- 21
1
vote
1 answer
how to fix The Process class relies on proc_open, which is not available on your PHP installation
I want to upload on hosting but can't upload.
(1/1) LogicException
The Process class relies on proc_open, which is not available on your PHP installation.
in Process.php line 143
at Process->__construct(array(), '/stage/data01/bipaio/public_html',…

Rezza Yusuf
- 11
- 1
- 2
1
vote
1 answer
Is there a way to make proc_open read input from a file if the file is dynamic?
I am trying to read input from a file as stdin for the process using proc_open . But this file is actually going to be dynamic i.e. User will enter something in another process into this file. What I want is that proc_open should wait until some new…

dc480506
- 21
- 1
- 5
1
vote
1 answer
Autoloading Classes Into PHP Interactive Shell
Am trying to run php Interactive shell from a php script. To be more specific, I want to be able to call my classes from interactive shell.
I manage to find this
# custom_interactive_shell.php
function proc($command, &$return_var = null, array…

Ghostff
- 1,407
- 3
- 18
- 30