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 #173036 is a reply to message #173035] Fri, 18 March 2011 13:21 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 9:02 AM, Marco wrote:
> On 2011-03-18 Jerry Stuckle<jstucklex(at)attglobal(dot)net> wrote:
>
>>>> What's in stderr? What happens if you write stdout and stderr to a file
>>>> (for testing)?
>>>
>>> They are both empty.
>>>
>>>
>>> Marco
>>>
>>
>>
>> Well, one of the things I see is you're using the -e flag with
>> passthru() but not with proc_open(). That's a huge difference.
>
> It's basically the same. Without »-e« the input goes to standard input, with
> »-e« it goes as a command line input. I think, the problem here is not the
> input, since the return value is zero, it is the missing output.
>
> passthru( "echo 'set terminal svg;plot sin(x)' | gnuplot" );
>
> The line above also produces the desired output.
>
>
> Marco
>

I understand that produces the correct output. But from what I read in
the doc, -e says to use stdin - which is what you're trying to use.
Without -e it goes to the command line, which you are not doing. So
it'd doing exactly what you tell it to do - nothing.

I suggest you ask the gnuplot people. I don't think the problem is the
output stream is failing - I think your commands are incorrect.

--
==================
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: Thu Nov 28 13:18:39 GMT 2024

Total time taken to generate the page: 0.04892 seconds