×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

The specified CGI application misbehaved????Invalid argument

The specified CGI application misbehaved????Invalid argument

The specified CGI application misbehaved????Invalid argument

(OP)
Hello,
I get this full error:
The specified CGI application misbehaved by not returning a complete set of HTTP headers:c:\inetpub\wwwroot\cgi-bin\wwwboard.pl line 263.

This is for a test Message Board I am working on(Intranet Site for work!)I am running on XP PRO IIS 5.1 with ActiveState Perl installed.

Here's where i think the problem might be:
# Define Variables
$basedir = "c:\inetpub\wwwroot\cgi-bin\wwwboard.pl";
$baseurl = "http://mysite/wwwboard.html";
$cgi_url = "http://mysite/inetpub/wwwroot/cgi-bin/wwwboard.pl";

Any idea's? I am new to this so any help would be great!

Thanks!

OCEANS11

RE: The specified CGI application misbehaved????Invalid argument

CGI scripts need to print out headers so the browser knows what type of file it's receiving (text/html, image/gif, etc).

For instance:

CODE

#!/usr/bin/perl -w

print "Content-Type: text/html\n\n";
print "hello world!";

Without printing the Content-Type, your server would give you that error.

So your error is probably not caused by setting those variables, it's probably caused by not printing HTTP headers.

-------------
Kirsle.net | Kirsle's Programs and Projects

RE: The specified CGI application misbehaved????Invalid argument

Also:

CODE

$basedir = "c:\inetpub\wwwroot\cgi-bin\wwwboard.pl";

The backslashes there will cause problems. Either single quote that variable or (more recommended) just use forward slashes.

CODE

$basedir = "c:/inetpub/wwwroot/cgi-bin/wwwboard.pl";

-------------
Kirsle.net | Kirsle's Programs and Projects

RE: The specified CGI application misbehaved????Invalid argument

Also, wouldn't basedir be looking for a directory and not the full path to the script?

 - George

RE: The specified CGI application misbehaved????Invalid argument

(OP)
Hello,

I changed the backslahes to forward slashes and now the error reads No such file or directory  line 236.

Here's the line:

# New File Subroutine

sub new_file {

   open(NEWFILE,">$basedir/$mesgdir/$num\.$ext") || die $!;

Any other idea's!

Thanks!

Oceans11

RE: The specified CGI application misbehaved????Invalid argument

>> Any other idea's!

Yes, use a valid path to the directory you want to use. Make sure the directory has read permission or any other permission the script may require.

is $mesgdir and $num and $ext all defined properly? Print it out as the script runs to see if so:

print "$basedir/$mesgdir/$num.$ext";

you don't need to escape the . in a double quoted string.

- Kevin, perl coder unexceptional!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close