[Tutor] Apache, CGI-BIN, Python
Eric Brunson
brunson at brunson.com
Tue Sep 11 06:43:38 CEST 2007
Alan Gauld wrote:
> "Ryan" <silas428 at gmail.com> wrote
>
>
>> I am running a Linux box and cannot find my Apache cgi-bin to put
>> some
>> python scripts in. I know I probably have to create one but don't
>> know
>> where and how.
>>
>
> I think there are several places that you can create cgi-bin depending
> on how you configure apache. But the place I usually see it is
> directly
> under the apache root directory - ie the one that is equivalent to /
> in
> the url.
>
But, if you read the apache configuration files, it will tell you were
it is. :-)
>
>> everything works fine except:
>>
>> form = cgi.FieldStorage()
>>
>> #This is where everything goes wrong
>> #I get error messages for either the lastname line or firstname
>>
>
> Can you tell us
> a) exactly what error messages and
> b) How you are invoking the script - where are the values
> supposed to be coming from?
>
>
>> lastname = form['lastname'].value
>> firstname =form['firstname'].value
>> message = firstname + " " + lastname
>> print reshtml % message
>>
>
> HTH,
>
>
>
More information about the Tutor
mailing list