Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

CGI Error

by mhoward (Initiate)
on Sep 27, 2001 at 18:08 UTC ( [id://115096]=perlquestion: print w/replies, xml ) Need Help??

mhoward has asked for the wisdom of the Perl Monks concerning the following question:

I am having problems with my installation of perl! I have just installed it onto my Win2000 web server, but every time I click on a link to my .pl file I receive this error... CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

Can't locate newsadmin_settings.pl in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at C:\Inetpub\wwwroot\Departments\IT\2ndLineSupport\Home\main\cgi-bin\news\newsadmin.pl line 28.

Has anyone got any ideas? I have checked permissions, file types etc.. Now I am stuck!

Edit kudra, 2001-09-29 Added formatting that was in duplicate version

Replies are listed 'Best First'.
Re: CGI Error
by tachyon (Chancellor) on Sep 27, 2001 at 18:33 UTC

    You need to post the code in newsadmin.pl. The error you are getting indicates that the first thing coming out of your script is not the required "Content-type: text/html\n\n" header but an error message. It appears the perl thinks that line 28 in newsadmin.pl is "use newsadmin_settings.pl" but that it can't find this (module) in @INC.

    Code would help.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Re: CGI Error
by cfreak (Chaplain) on Sep 27, 2001 at 20:36 UTC

    Sounds like your app has an error in it (can't locate the newsadmin_setting.pl) The CGI header error sounds like you don't have the headers specified when your program throws an exception. Usually you have to do  print "Content-type:text/html\n\n"; to get the correct headers

    Either that or if you are using CGI.pm print $cgi->header()

    Most likely if you fix the error of not finding the other script you are trying to call then the header issue will go away.

    But as a previous poster stated, you need to post the code so that we can tell for sure what the problem is.

Re: CGI Error
by suaveant (Parson) on Sep 27, 2001 at 18:11 UTC
    have you checked for the file newsadmin_settings.pl and made sure it is in your perl include path? The cgi can't find that file (in a require probably) which is being called within C:\Inetpub\wwwroot\Departments\IT\2ndLineSupport\Home\main\cgi-bin\news\newsadmin.pl, and is failing with an error

                    - Ant
                    - Some of my best work - Fish Dinner

      I take it you mean my #!.. path at the top of the scipt?

      I am under the impression that this path is not used within WinNT/2000? Is that not correct?

      My newsadmin_settings.pl file is in the same location as the .pl file I am attempting to access

      As you can tell...I am a beginner!

      I have this on a different web server, and it works with no problems

        if newsadmin.pl is the file you are running try one of the following...

        add -I. to your #! line...
        or put use lib '.'; before your require for newsadmin_settings.pl...

        or use lib 'path_settings_is_in';

                        - Ant
                        - Some of my best work - Fish Dinner

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://115096]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-23 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found