exec() incomplete $output
- From: "ajh" <ajhindle@xxxxxxxxxxx>
- Date: 26 Dec 2006 16:54:54 -0800
Using Ubuntu 5, Apache2 and PHP 4 I am trying display in a web browser
the output from a program I wrote in C.
Here is an abridged version of my code (I can post all of it later):
<?php
exec( "myProg -a paramA -b paramB", $output);
print "<p>Returned: $return</p>";
foreach ( $output as $val ) {
print "$val<br />";
}
?>
The problem is that in the web browser only the first two lines of the
$output appear when there should almost always more than that (usually
around 10).
I have done a test with php CLI using the same code as above: php -f
mycode. The right/expected ouput comes out here.
Any ideas how this different behaviour might be happening? Wondering if
there is some default limit on the number of lines displayed by php in
the browser... or if the actual lines are too long (but 100 chars isn't
too much is it?). Thanks.
.
- Follow-Ups:
- Re: exec() incomplete $output
- From: Erwin Moller
- Re: exec() incomplete $output
- Prev by Date: Re: ROUND
- Next by Date: Re: Loading png images into a mysql table/database
- Previous by thread: compile error
- Next by thread: Re: exec() incomplete $output
- Index(es):
Relevant Pages
|