Charlie Garrison wrote:
Good evening,

On 1/10/04 at 9:13 PM -0400, Sam Wilkins <[EMAIL PROTECTED]> wrote:


No matter what I run, even that, I get document contains no data. It works from the command line. If it helps, I'm on Mac OS X 10.3.5, Apache 1.3.29, and I don't know how to determine my mod_perl version.


This is a common problem with mod_perl and OSX. Add the following to your
httpd.conf file:

# fix for mod_perl print()
PerlHeaderParserHandler "sub { tie *STDOUT, 'Apache' unless tied *STDOUT; }"

I don't understand why the problem exists or why this fixes it. I took the
advice (found it via some Google searching) and mod_perl scripts now work for
me.

Most likely some core module untie's/re-tie's STDOUT after mod_perl had it tied. I'd love to have the guilty party discovered. It's have been easy if tie was overridable via CORE::GLOBAL::tie but it doesn't seem the case. So you probably need to set breakpoints at tie and untie to see which module messes with that.


Another solution is to use $r->print() instead of print() (use Apache->request to get $r if you don't have it already).

But in any case I'll add your workaround to the troubleshooting section. Thanks for posting it, Charlie.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to