Questions tagged [proc-open]

158 questions
2
votes
1 answer

Safely killing processes started with proc_open

After starting a the PHP built in server with with proc_open, I seem to be unable to kill it. $this->process = proc_open("php -S localhost:8000 -t $docRoot", $descriptorSpec, $pipes); // stuff proc_terminate($this->process); The server is working,…
DanielM
  • 6,380
  • 2
  • 38
  • 57
2
votes
1 answer

PHP - Kill proc_open() process on different file?

I am creating a background process using proc_open() and am wondering how to cancel or stop this background process, from a different file or action, while my background process is still running? Here is my code : $errorLog =…
Shaf
  • 174
  • 1
  • 1
  • 11
2
votes
0 answers

Run `git push origin master` commands using PHP

I am designing an application which has a layer ontop of git that would allow me to perform commits from the web browser instead of having to go CLI. The git repo will be on my own server. Part of the git process is git push origin master, but that…
Luke Madhanga
  • 6,871
  • 2
  • 43
  • 47
2
votes
1 answer

PHP: Zip a file stream on the fly on an intermediate server, without storing (too much) data

Related: On-the-fly zipping & streaming of large files, in PHP or otherwise Streaming a large file using PHP I'm looking for a combination of methods described in the other topics. I probably need to read the file (from URL) in small chunks, pipe…
okdewit
  • 2,406
  • 1
  • 27
  • 32
2
votes
1 answer

How do you keep the STDIN pipe open all the time when using proc_open?

I'm using a PHP script on Windows to communicate with a chess engine. I'm establishing the connection as follows: $descriptorspec = array( 0 => array("pipe", "r"), // stdin is a pipe that the child will read from 1…
Christopher Masser
  • 809
  • 13
  • 25
2
votes
0 answers

Run WP-CLI from PHP Script

I am currently trying to run a wp cli command from a php script. For those unfamiliar with WP-CLI its a cool command line interface for Wordpress. Below is my following script:
2
votes
1 answer

Go interactive with external program from PHP

I'd say it's quite a simple question but I'm stuck with it: I need to communicate with external program (specifically, Exim) run with some debug options. As I run it from linux shell, it goes like this: run exim -bh 11.22.33.44, then read its output…
Alexander
  • 464
  • 1
  • 5
  • 17
2
votes
1 answer

Sending signals to a process opened by proc_open()

We've got a utility here that's using proc_open() to call ssh to run commands on a remote machine. However, in some cases we need to halt the command on the remote machine but proc_close() and proc_terminate() do not cause the desired signal to be…
Sammitch
  • 30,782
  • 7
  • 50
  • 77
2
votes
1 answer

PHP popen and proc_open not returning binary output

When using popen or proc_open to run the following command to list the contents of a windows share: smbclient -N -U 'username%password' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -O 'TCP_NODELAY IPTOS_LOWDELAY…
gvtools
  • 21
  • 2
2
votes
1 answer

Reading STDOUT from aria2c in PHP script

Here is simple PHP script:
2
votes
2 answers

Environment is not passed to process opened by proc_open

I have a problem passing environment variables to processes that i opened with proc_open. I found the following example on http://us2.php.net/manual/en/function.proc-open.php array("pipe", "r"), // stdin is a…
jami
  • 190
  • 2
  • 14
2
votes
0 answers

PHP proc_open multiple input

I want to start a CLIPS process using proc_open function in order to interact with a CLIPS script. So if i set it like this: $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array('pipe', 'r') // 2 is…
user985409
  • 1,355
  • 3
  • 9
  • 18
2
votes
1 answer

php proc_open passing input to java slow

I'm using proc_open in php to call java application, pass it text to be processed and read output text. Java execution time is quite long and I found the reason for that is reading input takes most of the time. I'm not sure whether it's php's or…
Caballero
  • 11,546
  • 22
  • 103
  • 163
2
votes
1 answer

PHP proc_open avability

I made a PHP library that uses proc_open and relies on external application to process data. Now, I need to make a "check" file that will analyze the server and return if my library can be used on it. I figured these steps are enough: Check if…
user2742648
2
votes
0 answers

Svn remote Server certificate verification issue by php

In order to use websvn for browsing remote repository, I installed websvn in my localhost(windows7, wampserver). Websvn executes svn commands by proc_open of php functions. When svn command is: svn info "http://site.com/svnurl" --xml…
Sungil Lim
  • 21
  • 2
1 2
3
10 11