Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Re: Apache2 Frustrations

by !1 (Hermit)
on Nov 22, 2003 at 02:45 UTC ( #309108=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Apache2 Frustrations
in thread Apache2 Frustrations

The only issue of which I am aware that had me use Apache::compat deals with CGI.pm's header subroutine. Since it uses $r->send_cgi_header. According to the docs, send_cgi_header is not available under mod_perl2. Am I incorrect in my interpretation? If so, I am quite sorry. If not then I apologize for not mentioning it earlier.

Replies are listed 'Best First'.
Re: Re: Re: Re: Apache2 Frustrations
by cees (Curate) on Nov 22, 2003 at 03:52 UTC

    It may have been a problem before, as in the early versions of mod_perl2 there were a lot of missing functions, but send_cgi_header is there now.

    cees@tim:~$ perl -MApache2 -MModPerl::MethodLookup -e print_method sen +d_cgi_header To use method 'send_cgi_header' add: use Apache::Response ();

    So it is definately available now. However, I just checked through the CGI.pm source and can't find any place where it loads Apache::Response. So there is a possibility that is won't work without that. And a quick check shows that it doesn't get brought in by any other Apache2 modules that CGI.pm does load...

    tim:~# MOD_PERL=1 perl -MApache2 -MCGI -e '$,=$/;print sort keys %INC; +' APR/Pool.pm APR/XSLoader.pm Apache/RequestRec.pm Apache/RequestUtil.pm Apache/XSLoader.pm Apache2.pm ...

    The reasons Apache::compat fixes the problem is because it automatically loads Apache::Response which makes cgi_send_header available again.

    So short of writing a bit of code that uses CGI.pm's header function under mod_perl2 and actually testing it, I guess you might be right... It might be best to ask this on the mod_perl list.

    Update: I wrote a quick script using the sample script at the top of the CGI.pm docs and ran it under mod_perl 1.99_11 successfully. So I guess we can let this worry to rest :)

    -Cees

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://309108]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2021-09-28 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?