CGI problem

This is a discussion on CGI problem within the Windows Web Servers forums, part of the Web Server and Related Forums category; Hello, I'm new to Apache. I tried to call a Python cgi script and got the following message: Internal ...


Go Back   Usenet Forums > Web Server and Related Forums > Windows Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-05-2003
Normitcha
 
Posts: n/a
Default CGI problem

Hello,
I'm new to Apache. I tried to call a Python cgi script and got the
following message:

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

Please contact the server administrator, nlbsilva@yahoo.com 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.
--------------------------------------------------------------------------------

I have python path in the script's 1st line and the script in the
cgi-bin folder, where the documentation says to put it.

my HTML code is: <form method=GET
action="http://localhost/cgi-bin/test3.cgi">

Thank you,
Norma.
  #2 (permalink)  
Old 12-07-2003
Johannes Lichtenberger
 
Posts: n/a
Default Re: CGI problem

nlbsilva@yahoo.com (Normitcha) wrote:

[Internal Server Error]

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


What's in the server error log? Please let us know.

> I have python path in the script's 1st line and the script in the
> cgi-bin folder, where the documentation says to put it.
>
> my HTML code is: <form method=GET
> action="http://localhost/cgi-bin/test3.cgi">


ScriptInterpreterSource registry
ScriptAlias /cgi-bin/ "/www/cgi-bin/"
AddHandler cgi-script .py

#!python
print "Content-Type: text/plain\n"
print "hello world"

This works fine - doesn't it? Assuming anything.py instead of .cgi.
If it doesn't work get netcat and play webserver with it.

C:\>nc -l -p 4000[ENTER]

Then click the button at your HTML-Document and post the output.
--
Johannes Lichtenberger · http://www.nabooisland.com
  #3 (permalink)  
Old 12-07-2003
Johannes Lichtenberger
 
Posts: n/a
Default Re: CGI problem

Johannes Lichtenberger <auch-ich-m@g-kein-spam.com> wrote:

> nlbsilva@yahoo.com (Normitcha) wrote:
>
> [Internal Server Error]
>
>> More information about this error may be available in the server error
>> log.

>
> What's in the server error log? Please let us know.
>
>> I have python path in the script's 1st line and the script in the
>> cgi-bin folder, where the documentation says to put it.
>>
>> my HTML code is: <form method=GET
>> action="http://localhost/cgi-bin/test3.cgi">


Well, if you try to play webserver with netcat (on Port 4000) it should
be <form method=GET action="http://localhost:4000/cgi-bin/test3.cgi">

> ScriptInterpreterSource registry
> ScriptAlias /cgi-bin/ "/www/cgi-bin/"
> AddHandler cgi-script .py
>
> #!python
> print "Content-Type: text/plain\n"
> print "hello world"
>
> This works fine - doesn't it? Assuming anything.py instead of .cgi.
> If it doesn't work get netcat and play webserver with it.
>
> C:\>nc -l -p 4000[ENTER]
>
> Then click the button at your HTML-Document and post the output.

--
Johannes Lichtenberger · http://www.nabooisland.com
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:28 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0