Practical mod_perl / HTML Book / books


previous page: 4.10.5. Protecting Private Status Locationspage up: HTML Version of the booknext page: 4.12. References

4.11. General Pitfalls


Search







modperlbook.org


 HTML Book


 PDF Book


 Download Code


 Table of Contents


 Errata


 mod_perl2 User's Guide


 Sitemap





Add to Google



Creative Commons License


Written by
Eric Cholet (Logilune)
and Stas Bekman (StasoSphere).

Hosted by ibiblio.org.



The following are some of the mostly frequently asked questions related to mod_perl configuration issues (and the answers, of course).

My CGI/Perl code is returned as plain text instead of being executed by the web server.
Check your configuration files and make sure that +ExecCGI is turned on in your configurations. + adds an option without resetting any options that were previously set. So this is how the <Location>section might look:

<Location /perl>
    SetHandler perl-script
    PerlHandler Apache::Registry
    Options +ExecCGI
    PerlSendHeader On
</Location>
My script works under mod_cgi, but when called via mod_perl, I get a Save As prompt.
You probably sent the HTTP header via print( ):

print "Content-type: text/html\n\n";

If this is the case, you must make sure that you have:

PerlSendHeader On

in the configuration part of the <Location> section:

<Location /perl>
    ...
    PerlSendHeader On
</Location>

This adds a little overhead to the output generation, because when this configuration is enabled, mod_perl will parse the output and try to find where the header information ends so it can be converted into a proper HTTP header. It is meant only for mod_cgi emulation with regard to HTTP headers.

Is there a way to provide a different startup.pl file for each individual virtual host?
No. Any virtual host will be able to see the routines from a startup.pl file loaded for any other virtual host.

 

Continue to:

  • prev: 4.10.5. Protecting Private Status Locations
  • Table of Contents
  • next: 4.12. References

Tags

mod_perl, modperl, Apache, perl, cgi, html, mod_perl, e-commerce, scalability, free, open source, OSS, apache, squid, high availability, modperl, linux, unix, Web, www, mod_perl, webserver, admin, apache, book, webmaster, tools, modperl, guide, docs, documentation, help, mod_perl, perl, information, apache, script, errata, eric cholet, perl, apache, mod-perl, stas bekman, mod_perl, cool, perl, Apache, performance, speed, choice




Other projects to check out: meta-religion.com is for those interested in Religious, Spiritual and Esoteric Phenomena. i-want-a-better.com is a community of people discussing what they would like to be improved in their lives and things they use and interact with. You may also want to find a healer in your area or read articles on variety of topics.






TOP
previous page: 4.10.5. Protecting Private Status Locationspage up: HTML Version of the booknext page: 4.12. References

© 2007 StasoSphere

[ Privacy Policy ] [ Terms of Use ] [ About Authors ] [ Search ]

Last modified Tue Feb 24 12:54:54 2009