HP3000-L Archives

August 2002, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Mark Bixby <[log in to unmask]>
Date:
Wed, 28 Aug 2002 14:56:20 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (77 lines)
Perl output is buffered by default, but traditional MPE output is unbuffered.

You need to tell Perl to use unbuffered output before you do any printing:

        select(stdout); $|=1;

The web server is getting confused because the unbuffered output (DISCFREE) is
hitting the web server before the buffered Content-type: header.

- Mark B.

John Korb wrote:

> Thanks Ron, Michael, and Greg!
>
> Hmmm.  Progress, but still there are problems.  I'm getting a lot of 500
> errors - "server error" - and the Apache error_log shows a lot of
> "malformed header=" with the text after the "Malformed header=" either
> blank or containing garbage.
>
> So, I'm off to run more experiments!
>
> Thanks again to all for your help!
>
> John
>
> At 2002-08-28 03:14 PM, you wrote:
>
>> Again, thanks to everyone!
>>
>> I have a working Perl script.  That is, it works if run from the POSIX
>> shell prompt.
>>
>> However, when I invoke it from a web browser and Apache serves it up, the
>> output of the MPE program apparently goes to the Apache job's $STDLIST
>> and
>> not back out to the web browser.  For example, when I try:
>>
>> #!/usr/local/bin/perl
>>
>> print "Content-type: text/html\n\n";
>> print "<HR><P>\n";
>> system ("/SYS/PUB/DISCFREE A");
>> print "<P><HR>\n";
>>
>> I see only a horizontal rule, the program header for DISCFREE, and the
>> seconds horizontal rule.  I don't see any of the "DISCFREE A" output.
>>
>> I created a "Hello World!" program in a Business Basic and SPLASH! and
>> if I
>> replace the "/SYS/PUB/DISCFREE A" with "/SYS/PUB/HELLOWLD" I receive only
>> the two horizontal rules - no "Hello World!" text.
>>
>> Anyone have any ideas as to what is happening here and how to get
>> around it?
>>
>> Thanks!
>>
>> John
>>
>> * To join/leave the list, search archives, change list settings, *
>> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
>


--
[log in to unmask]
Remainder of .sig suppressed to conserve expensive California electrons...

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2