[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
newlispfanclub.alh.net • View topic - cgi; stream output from exe to stdout
Page 1 of 1

cgi; stream output from exe to stdout

PostPosted: Sat Mar 29, 2014 8:10 am
by hds1
Hello all,

in a cgi script i'am trying to pipe the output from an exec prog via a stream to the browser. i.e. the output from "mapserver" et al. ; could be MByte large pictures.
In Perl i can use print and backquotes like:
<snip>
$ENV{"QUERY_STRING"}=blah blah
print `/path/to/mapserv`; # -> output goes to the browser
<snap>

I cannot wrap my mind around the exec statement in newlisp. According to the docs i could use:
(exec "/path/to/mapserv" query) opening a str-input.
But IMHO that store's the content in "query" which i would like to avoid.

How can i redirect the stream or "query" directly to "stdout" ?

Regards
hds1

Re: cgi; stream output from exe to stdout

PostPosted: Sat Mar 29, 2014 5:57 pm
by Lutz

Re: cgi; stream output from exe to stdout

PostPosted: Sat Mar 29, 2014 11:04 pm
by Lutz
http://www.newlisp.org is currently - UTC 23:02, 4:02pm PDT - down and the service provider will restore from an older backup. This backup will probably not contain the newlisp.org/example.cgi from the last post. I will put it back as soon as I have a chance.

PS: site is up again at 8:08pm PDT and example works.

Re: cgi; stream output from exe to stdout

PostPosted: Sun Mar 30, 2014 4:25 pm
by TedWalther
Lutz, how does that work if it is a process that runs forever, perhaps "tail -f /var/www/log/mywebsite.com" ?

Re: cgi; stream output from exe to stdout

PostPosted: Sun Mar 30, 2014 6:09 pm
by hds1
@Lutz,

thanks for the reply, but still the output is saved first in avariable and then send out to whom ever it shall go.

Can't it be done without interime saving ?

Consider Pictures, video streams or such. You don't want to save them, you want to pass the stream "through".

Thanks
hds1

Re: cgi; stream output from exe to stdout

PostPosted: Sun Mar 30, 2014 6:35 pm
by Lutz
see here: http://www.newlisp.org/downloads/CodePa ... html#toc-2

sub chapter Scripts as pipes

Re: cgi; stream output from exe to stdout

PostPosted: Sun Mar 30, 2014 6:40 pm
by TedWalther

Re: cgi; stream output from exe to stdout

PostPosted: Sun Mar 30, 2014 6:59 pm
by Lutz
and this link may also be relevant:

http://www.newlisp.org/downloads/CodePa ... tml#toc-15

Re: cgi; stream output from exe to stdout

PostPosted: Mon Mar 31, 2014 5:14 pm
by TedWalther

Re: cgi; stream output from exe to stdout

PostPosted: Mon Mar 31, 2014 7:02 pm
by Lutz

Re: cgi; stream output from exe to stdout

PostPosted: Mon Mar 31, 2014 8:09 pm
by TedWalther

Re: cgi; stream output from exe to stdout

PostPosted: Mon Mar 31, 2014 9:06 pm
by Lutz

Re: cgi; stream output from exe to stdout

PostPosted: Mon Mar 31, 2014 9:24 pm
by TedWalther

Re: cgi; stream output from exe to stdout

PostPosted: Wed Apr 02, 2014 1:22 pm
by Lutz
Looks like a good idea, but wouldn't be for 10.6.0, also with a different name. The return value would be different - a list - and I don't want to break compatibility with older code. device is one of the oldest functions in newLISP.

Re: cgi; stream output from exe to stdout

PostPosted: Wed Apr 02, 2014 4:13 pm
by TedWalther

Re: cgi; stream output from exe to stdout

PostPosted: Wed Apr 02, 2014 4:30 pm
by Lutz
What I meant was the form (device) to inquire the current channel, which returns one integer. I would rather introduce it in development releases, as the the whole std I/O area touches many other areas, e.g. web and cgi.

Re: cgi; stream output from exe to stdout

PostPosted: Wed Apr 02, 2014 6:42 pm
by TedWalther
Ok.