Search code examples
cgi-bin

Issue with Perl script and Apache2.2


we have a perl script which is used to call 404 error when file is not present on Apache webserver , this is working fine . But it is failing when it is called inside the folder(cgi-bin) were is script is located.

for eg www.site.com/cgi-bin/test (this should invoke 404 but instead of 404 error this prints below error which is displayed on browser).

h1>Software error:

slurp_filename('/cgi-bin/t') / opening: (2) No such file or directory at /usr/lib64/perl5/vendor_perl/ModPerl/RegistryCooker.pm line 541

Any help will be appreciated


Solution

  • Removed the error by changing :

    #SetHandler perl-script
    #PerlResponseHandler ModPerl::PerlRun
    

    to :

    SetHandler cgi-script
    PerlResponseHandler ModPerl::Registry