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 #173035 is a reply to message #173034] Fri, 18 March 2011 13:02 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:

>>> 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
[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: Mon Nov 25 18:11:19 GMT 2024

Total time taken to generate the page: 0.04238 seconds