Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://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
produce:
/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
produce:
/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...

bassplayer


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

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found