FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Pipe the content of a variable to a process
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Pipe the content of a variable to a process [message #173048 is a reply to message #173046] Fri, 18 March 2011 19:54 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  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
>

OK, I downloaded and installed gnuplot on my system. Change this line:

$stdin_data = "set terminal svg;plot sin(x)\n";

Note the newline char at the end.

It works for me.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: use of array_key_exists() to prevent duplicates?
Next Topic: $_POST not set on 404
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 22:51:13 GMT 2024

Total time taken to generate the page: 0.04175 seconds