All of the checkpoints by moritz are strategically correct, but here are some tactical things to do to help debugging:

  • I assume that your webserver is properly configured (can you run other scripts?) and that your file/directory permissions are correct.
  • Compare your environments both in the shell (env|sort) and perl (print Dumper(\%ENV);) and compare the results from when you are logged in as yourself versus when the script is called by the webserver.
  • Make sure you can see the webserver access and error logs and know how to interpret messages there (or at least post them to perlmonks next time).
  • Your version of SVN is probably compiled against various shared libraries. These shared libraries may be installed in /usr/local/lib which is in your environmental variable LDPATH or LD_LIBRARY_PATH. However this env variable may be set to something different for the webserver process calling your perl script. I have frequently had problems like the one you are describing, and have discovered that the webserver error logs show that libraries like libapr, libapr_util, libiconv, libneon, etc could not be found when the webserver spawned process tried running SVN. SVN uses a lot of "non-core" (to the OS) libraries.

    In reply to Re: Why does the same perl routine behave differently under cgi? by fzellinger
    in thread Why does the same perl routine behave differently under cgi? by binurajkr

    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.