note 89288 rejected from function.proc-open by thiago
| From: | thiago@php.net | Date: | Mon, 02 Mar 2009 12:57:12 +0000 |
| Subject: | note 89288 rejected from function.proc-open by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151317@lists.php.net to get a copy of this message | ||
Note Submitter: vitolini at gmail dot com
----
Hi I am using the proc_open to get status information of a file from cvs... when i execute the php
from command line i get the output, however when i type it into the browser i don't receive the
output... Here is my code...
$desc = array(
0 => array('pipe', 'r'), // stdin
1 => array('pipe', 'w'), // stdout
2 => array('pipe', 'w') // stderr
);
$process = proc_open("cvs status -v info.php", $desc, $pipes);
$tmp = stream_get_contents($pipes[1]);
print "Result is : " . $tmp;
print "Length is : " . strlen($tmp);
proc_close($process);
exit();
Command line returns ...
Result is : File: info.php Status: Locally Modified
Working revision: 1.3 2009-03-01 23:30:25 -0800
Repository revision: 1.3 /m.......
.....
Length is : 565
On the webpage all is see is "Result is : Length is : "
When i check the FireBug, i don't see anything other than this data... I am plucking my hair
trying to debug this issue. How come the command line prints the output and not on the webpage?
Thanks,
Vito