Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I have half a dozen scripts that make up a shopping cart system. The main script calls subroutine scripts using a Require function (e.g. require "config.cgi";).

I've developed the system on a Linux server and now I've leased website space with www.omnis.com to begin final testing and production. The Omnis server is also running with Linux.

The problem: The scripts won't run on the Omnis.com server. When I try to call the system I get the dreaded 500 Internal Server Error message. To say that the Omnis technical people have been less than helpful would be a gross understatement. They loaded a three line script into my cgi-bin and ran it, reporting that the system works and that's the most they can do. They say that debugging code isn't their responsibility. I never asked them to debug the script, and they completely ignored my request for information about error messages on the server logs.

Using a script called AdminPro, I've learned that the main script is failing when it reaches the Require function that calls the configuration subroutine. That occurs at the very start of the script. The error message says:

Can't locate config.cgi in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.4/i686-linux /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4 /usr/local/lib/site_perl .) line 12.

From experience I know that this message usually pops up when there's a problem with the subroutine script, but these scripts are all working perfectly on the testing server. The permissions on the new server are correct, the scripts all pass Omnis Perl checker for correct syntax, and I uploaded them correctly.

I thought that scripts within the same file directory were automatically loaded into the @INC array but I guess that I was wrong. And on the possibility that relative addressing isn't working, I changed the Require function to reflect the full path. No difference.

My questions:

1) Is the @INC array unique to each website, or is it a common array used by all websites on that server?

2) Is it possible that the server is set not to allow the use of the Require function that so people can't contaminate the @INC array with special mods?

3) Is there a way to force the loading into the @INC array?

I'll be grateful for any suggestions since the people at Omnis.com won't provide any help at all.

Thanx in advance for any help you can provide.


In reply to Require a script not found in @INC array by TJD

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, 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?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (2)
    As of 2020-12-01 06:28 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?