Dear monks,

I just wrote an Perl "survey script" which uses CGI.pm and XML::Simple.

The program works fine, however, when I upload it to my webserver - which is virtually hosted :( - It dies. Not gracefully, either... the browser reports that it's still "Waiting Request."

Here's the error message from the server log.

Can't locate loadable object for module XML::Parser::Expat in @INC (@I +NC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /us +r/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 + /usr/lib/perl5/site_perl .) at XML/Parser.pm line 15 Compilation failed in require at XML/Parser.pm line 15. BEGIN failed--compilation aborted at XML/Parser.pm line 27. Compilation failed in require at XML/Simple.pm line 224.

So I thought, and I remembered that I asked in the chatterbox if one could use a module, even if one doesn't have access to that machine. I was told that you could, either by simply uploading it, or putting the guts of the module in your file.

I tried uploading XML::Simple, and all its dependencies (The entire XML, LWP, and URI directories under perl/site/lib), to no avail. I also added

BEGIN{ push (@INC, "/home/httpd/vhosts/newrisedesigns.com/cgi-bin", "/home/httpd/vhosts/newrisedesigns.com/cgi-bin/XML", /home/httpd/vhosts/newrisedesigns.com/cgi-bin/XML/Parser"); }

I'd like to keep the XML component (it's how the votes are stored on the server) however, I might have to scrap it if I can't get it working. :(

I'm stuck again, and I greatly appreciate any help you are willing to offer.

John J Reiser
newrisedesigns.com


In reply to Using/Installing modules on a remote webserver by newrisedesigns

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.