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)