Have you looked at the httpd error_log file yet? If the script is dying, maybe there's a relevant error message in the web server log. If not, I'm not sure where else to begin.

Also, since there is no "use CGI" (or use of any CPAN modules), and instead there are several "require" statements for (presumably) home-grown chunks of code, I'm assuming this thing was originally written for Perl 4. Would you consider refactoring the code so that it takes advantage of Perl 5 and CPAN (e.g. at least CGI, and possibly something like HTML::Template)?

Also, since you are using regex substitutions to highlight "bad" words, I wonder if the problem might be related to the particular data associated with the current script / web-site, rather than with the code. People using current perl modules and methods do not use regex substitutions for this sort of editing. HTML::Parser or something built on top of that (e.g. HTML::TokeParser or others) would be a safer, less brittle approach. But again, that entails a fairly drastic refactoring/rewrite of the current code.

(I googled "cgi-lib.perl" -- at least it doesn't appear to be the infamous "Matt's Scripts", but it looks to be about 10 years old. Time for an update, don't you think? Esp. considering that some of the content at http://cgi-lib.berkeley.edu/, which purports to be the "cgi-lib.pl home page", appears to have vanished, for instance the stuff that was linked to "CGI Security" -- not a good sign...)

(updated to fix typo in first paragraph)


In reply to Re: Need help with badwords routine by graff
in thread Need help with badwords routine by htmanning

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.