10.3: Fix mod_perl print() output

Dec 05, '03 10:31:00AM

Contributed by: mblythe

The Apache build that comes with Panther does include mod_perl, but for some reason the output of the standard Perl print() routine is not redirected to the web browser as it should be. You can always build your own Apache to solve the problem, but this solution is easier. Just add the following line to your /etc/httpd/httpd.conf file:


PerlTransHandler "sub { tie *STDOUT, 'Apache' unless tied *STDOUT;  }"
[robg adds: I haven't tested this one...]

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20031129120521712