Re: Pipe the content of a variable to a process [message #173047 is a reply to message #173046] |
Fri, 18 March 2011 19:45 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 3/18/2011 3:21 PM, Marco wrote:
> On 2011-03-18 Jerry Stuckle<jstucklex(at)attglobal(dot)net> wrote:
>
>> Are you running your test from the CLI? Or are you trying to run it as
>> part of the web page?
>>
>> If the latter - are you putting out valid html? Have you looked at the
>> document source to see what's there?
>
> At first I tried putting it into a (valid) web page. During the creation of
> the minimal example I removed all the html stuff. I sent the complete script
> in my second post in this thread. When I look directly at the source I just
> see the »0« (echo $return_value . "\n";). And when I redirect stdout and
> stderr to a file there's a »0« in file_stdout and file_stderr is empty.
>
> I have absolutely no clue what's going on here, since it works with »cat« as a
> process and gnuplot works with »passthru«. That »cat« works means that my
> workflow with the pipes is right and that gnuplot works with »passthru« means
> that gnuplot is working inside PHP.
>
> Thanks for your help, I hope we can get it solved.
>
> Marco
>
It sounds like gnuplot isn't getting the input properly then.
What happens if you execute gnuplot from the command line with the input
as you sent it, i.e.
gnuplot
set terminal svg;plot sin(x);
And does gnuplot require a nl ("\n") character at the end of stdin?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|