HP3000-L Archives

May 2000, 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:
Eben Yong <[log in to unmask]>
Reply To:
Date:
Thu, 25 May 2000 17:19:08 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (67 lines)
Mark,

$| = 1;

Yep... that's it.  Works perfectly now.

Thanks for not only helping me to install Perl/iX today, but also to fix the
i/o problem.

Eben

-----Original Message-----
From: Mark Bixby [mailto:[log in to unmask]]
Sent: Thursday, May 25, 2000 5:05 PM
To: [log in to unmask]
Cc: [log in to unmask]
Subject: Re: Apache/iX and Perl/iX system() question




Eben Yong wrote:
>
> Hello,
>
> I am hacking away at Perl/iX... I think I have a permissions problem but I
> don't know where to look to squash the bug.  While in the posix shell the
> program executes without any problem, but trying to run the program from
my
> web browser thru Apache/iX and I get an "Internal Server Error".

Whenever you get "Internal Server Error", you want to look at the Apache
error_log file.

> #!/usr/local/bin/perl

#!/PERL/PUB/perl is preferred, but won't change what's happening here.

> #
> # Main body starts here.
> #
>
> print <<EOF;
>
> <HTML>
> <HEAD>
> <TITLE>TEST TITLE</TITLE>
> </HEAD>
> <BODY>
> <H1>TEST HEADER</H1>
> <PRE>
> EOF
>
> system("callci 'echo 123'");

The problem is that you're mixing buffer I/O from Perl, and non-buffered I/O
from the CI.

Since you can't tell the CI to buffer its I/O, you must tell Perl to stop
buffering its I/O.

Modify your Perl script to do the following before you create any output:

$| = 1;

- Mark B. (who has just built Apache/iX 1.3.12 internally)

ATOM RSS1 RSS2