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 #173049 is a reply to message #173048] Fri, 18 March 2011 20:09 Go to previous messageGo to previous message
Marco is currently offline  Marco
Messages: 11
Registered: March 2011
Karma:
Junior Member
On 2011-03-18 Jerry Stuckle <jstucklex(at)attglobal(dot)net> wrote:

> 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.

Thats it!!!!! Million thanks.

How can that be?! In the shell it works without »\n«. Anyway, thanks for the
effort you put into solving my problem.


Marco
[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: Fri Nov 22 06:39:02 GMT 2024

Total time taken to generate the page: 0.05291 seconds