Hi Fellow Monks,

I am upgrading my previous Apache 1.3.27 to 2.0 (latest) for a perl application, both SSL enabled and on Win32. I have just setup Apache 2.0 with Mod_perl2. The problem is coming when I am trying to port application code. The following error is encountered during the execution of startup.pl:

" $parms->add_config() has failed: Global $r object is not available. Set:\n\tPerlOptions +GlobalRequest\nin httpd.conf"

Some old posts on the web suggested this to be a cgi.pm problem and so I installed the latest version of CGI but the problem persists.

I also have Apache2::Compat so I guess backward compatibility should not be an issue.

I have updated and reinstalled the Apache2::Request module.

I also explicitly put the "PerlOptions +GlobalRequest" statement in the httpd.conf file but the error is still there.

I am stuck here..any suggestions? Thanks in advance.


In reply to mod_perl2/Apache2 problem: "Global $r object unavailable..." by Truman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.