Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 816119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:46:51+00:00 2026-05-15T01:46:51+00:00

I am using a Perl module called from a CGI scipt in IIS 6

  • 0

I am using a Perl module called from a CGI scipt in IIS 6 that is bombing. The identical folder structure on an XP machine (IIS 5.1) works fantastic. If I remove the module loading command at line 9, it will print “about to load” and “ok”, but When I try to run

use Language::Guess;

I receive

The specified CGI application
misbehaved by not returning a complete
set of HTTP headers.

in the browser.

The folder structure is
/cgi-bin/test.pl
/PerlModules/Language/Guess.pm

I have tried adjusting the file/folder permissions and have reviewed my IIS configuration time and again. It runs fine from the command line on the IIS machine or if I copy the module into \Perl\site\lib, but I don’t have permission to load modules on the shared server this script is destined for. Am I missing something simple?

Here is test.pl

use strict;
use CGI ':standard';

print header("text/html");

use lib "..\\PerlModules\\"; 
print "about to load<br/>";
#bombs here
use Language::Guess;

print "ok"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T01:46:52+00:00Added an answer on May 15, 2026 at 1:46 am

    The problem is the line

    use lib "..\\PerlModules\\";
    

    Change it to the full path to where the Perl modules are:

    use lib "C:\\Perl\\PerlModules\\";
    

    or whatever.

    Reason is that your CGI script run from the command line in the same directory is OK, but when it is being run with an absolute path by the server from a different directory, the directory ..\\PerlModules\\ is no longer the correct location of the modules (because now .. is relative to the server’s directory, not your script’s). When it tries to load the module, it can’t find it and prints an error message. The web server can’t cope with the error message, so you get the above.

    If you don’t want to use the absolute path in your cgi script, investigate using use lib inside a BEGIN block with the FindBin module.

    One thing which alleviates this kind of problem is the CGI::Carp module and its “fatalsToBrowser” option:

     use CGI::Carp 'fatalsToBrowser';
    

    catches mistakes & throws them out to the browser. This is for debugging only though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From everything I've read on using Perl modules, the basic usage is: Module file
I am uploading files from local to FTP using perl Net::FTP Module. After uploading
Given that I'm using Module::Build to build my perl module, I'd like to test
I am using the Perl CGI module. If I have HTML like this <select
So I am creating cookies using Perl's CGI module, and I do it as
I have a Perl module that I would like to use from Java. Is
Using the Perl module Net::Telnet, how do you send an arrow key to a
I'm using Perl's DBI module. I prepare a statement using placeholders, then execute the
I'm using Perl's Calendar module to create a date, and I want to serialize
I'm creating an XML file using Perl and XML::Simple module. I successfully create the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.