logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Error when executing scripts on 2.0.55 win2003 apache
Author
apacheloungebugmenot



Joined: 30 Jan 2006
Posts: 4

PostPosted: Mon 10 Apr '06 11:49    Post subject: Error when executing scripts on 2.0.55 win2003 apache Reply with quote

I'm trying to make a file upload script on my server, and I think I have done everything, even though I must have overlooked something completely obvious.

Whenever I try to run the script from a form, I either get:
Quote:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, ----------------- and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

if I set the form action as "/cgi-bin/upload.cgi"

or
Quote:
Not Found

The requested URL /upload.cgi was not found on this server.

if I set the form action as "upload.cgi"


Can someone perhaps tell me what I'm doing wrong, and don't be too hard on me if I'm a complete noob. Rolling Eyes


Last edited by apacheloungebugmenot on Mon 10 Apr '06 13:13; edited 1 time in total
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Mon 10 Apr '06 12:51    Post subject: Reply with quote

What error you get in the Apache error.log ?

Steffen
Back to top
apacheloungebugmenot



Joined: 30 Jan 2006
Posts: 4

PostPosted: Mon 10 Apr '06 13:12    Post subject: Reply with quote

If I have /cgi-bin/upload.cgi as the form action:
Quote:
[Mon Apr 10 13:06:33 2006] [error] [client 192.168.1.1] C:/Program Files/Apache Group/Apache2/cgi-bin/upload.cgi is not executable; ensure interpreted scripts have "#!" first line, referer: http://------------------/file_upload.html
[Mon Apr 10 13:06:33 2006] [error] [client 192.168.1.1] (9)Bad file descriptor: don't know how to spawn child process: C:/Program Files/Apache Group/Apache2/cgi-bin/upload.cgi, referer: http://------------------/file_upload.html

The script definitely starts off with #!, the first line is:
Code:
  #!C:/perl -w
or am I doing something wrong there?

and if I just have the script name, so it looks in the root directory:
Quote:
[Mon Apr 10 13:08:35 2006] [error] [client 192.168.1.1] script not found or unable to stat: C:/Program Files/Apache Group/Apache2/htdocs/upload.cgi, referer: http://------------------/file_upload.html
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Mon 10 Apr '06 15:03    Post subject: Reply with quote

Try as first line:

#!c:\perl\bin\PERL.EXE


Steffen
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 10 Apr '06 15:08    Post subject: Reply with quote

Did you add the handler in httpd.conf?

Added options ? +ExecCGI

AddHandler cgi-script cgi pl ??
Back to top
apacheloungebugmenot



Joined: 30 Jan 2006
Posts: 4

PostPosted: Mon 10 Apr '06 15:46    Post subject: Reply with quote

doesn't work unfortunately. is there maybe something wrong with my perl?

where should i direct the form to?

James Blond, yes I added all of that.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 10 Apr '06 16:56    Post subject: Reply with quote

Did you try
ScriptAlias /cgi-bin/ C:/perl/bin/

Did you try to reinstall perl ?
Back to top


Reply to topic   Topic: Error when executing scripts on 2.0.55 win2003 apache View previous topic :: View next topic
Post new topic   Forum Index -> Apache