Re: [ldm-users] ldm piping to php scripts

It must be PHP. The way the LDM pipes to a decoder hasn't changed in a very
long time.

Regards,
Steve Emmerson

On Sat, Feb 27, 2016 at 6:40 PM, Jeff Lake <jefflakejeff@xxxxxxxx> wrote:

> good evening ldmers
> for those of you that write your own php scripts and have ldm pipe to them
> if you use the following
> like I did..
> #*!/usr/bin/php*
> *<?php*
>
>
> *$fp = fopen('php://stdin','r');*
> *$data = "";*
> *while(!feof($fp)) {*
> *     $data .= fgets($fp,4096);*
> *}*
>
> *fclose($fp); *it was either a change in ldm or php that this no longer
> works.. (I would believe changes in php specifically my version 5.6.19)
> after spending   a few days on google
> and testing and testing..
> I found the following works..
>
> #*!/usr/bin/php*
> *<?php*
> *$data = stream_get_contents(fopen("php://stdin", "r"));*
> so before any of you go batty when you upgrade php and your php decoders
> cease to work
> I'd figure I'd save you the trouble..
>
> -Jeff Lake
>
> _______________________________________________
> ldm-users mailing list
> ldm-users@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> http://www.unidata.ucar.edu/mailing_lists/
>
  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the ldm-users archives: