Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Thanks for the lengthy response. I tried your script and it failed on the problem server, and succeeded on the working server. Given that, you are saying that if the issue is likely permissions. As stated in my original post, my script works at command line whether as root, or as the user that apache runs as. For the record, I am indeed testing on the same machine as the CGI is running. Same script, actually, with a use lib statement added to lead to our modules (a line usually provided by mod_perl).

I also tried running your test script with the shebang line pointing to any perl install I could find, as well as without a shebang line, using all of the different perl installs before the script name. Is there another way that permissions could be affecting this that I am not seeing, or can you suggest further tests to help me narrow this down? I also added the following line to your script:

print "\nVERSION:  ".`perl -v`."\n";

The version was always displayed as 5.8.0, regardless of what I tried to make it use (via shebang or command line). The perl installs appear to be different (not just symbolic links to one). The @INC array did change with each different shebang line:
#!/usr/bin/perl #!/usr/local/bin/perl #!/usr/local/bin/perl5.8.0
/usr/local/lib/perl5/5.8.0/i386-freebsd /usr/local/lib/perl5/5.8.0 /usr/local/lib/perl5/site_perl/5.8.0/i386-freebsd /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl

#!/usr/bin/perl5 #!/usr/bin/perl5.00503
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503

Update: Fixed shebang typos (second group).

Not sure if any of that helps at all...


In reply to Re: Re: LWP::UserAgent connection problem as CGI by bassplayer
in thread LWP::UserAgent connection problem as CGI by bassplayer

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    [LanX]: Network (1976 film) yeah
    [LanX]: yeah, we just had a discussion at work that SciFi in the 70s had more inovation
    [LanX]: (movies)
    [Your Mother]: Real ideas. Ideas grounded in reality as well.
    [LanX]: still some good newer ones. Oblivion had a great design, Moon was well acted
    [Your Mother]: Moon was mind bending and lovely and what's his nose Sam is *always* fun.
    [LanX]: the new BS Galactica series is my all time SoapFiction favourite ...
    [Your Mother]: I even liked "The Arrival" and I generally hate time travel (oriented) stuff.
    [Your Mother]: Gotta go. Stay out of trouble.
    [LanX]: no worries ... mainland Europe is safe ;-P

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (11)
    As of 2018-03-19 15:08 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (240 votes). Check out past polls.