[Tutor] CGI Help

Timothy M. Brauch tbrauch@mindless.com
Tue Apr 8 00:07:07 2003


From: "Seabrook, Richard" <rhseabrook@aacc.edu>

From: Timothy M. Brauch [mailto:tbrauch@mindless.com]
[ deleted ]

Here are the permissions I have set:

[root@linux0 simple]# dir
total 28
-rw-r-xr-x    1 root     root          978 Apr  7 23:05 simple2.py
-rw-r--r--    1 root     root          676 Apr  7 22:48 simple.html
-rw-r-xr-x    1 root     root          628 Apr  7 22:48 simple.py

The problem I get is when I click "Send It!" on the simple.html webpage, I get to look
at my simple2.py code, but it does not execute.  Any ideas what I might be doing
wrong?

 - Tim

=========================================================
Could be a path problem.  Try checking the httpd error
log (probably in /var/log/httpd) to see what program
it's trying to execute.
Dick S.

=========================================================

There are no lines in my error_log that says anything is going wrong.  Here is what my access_log has to say about it:

win98.tbrauch - - [07/Apr/2003:23:07:36 -0400] "GET /simple/simple.html HTTP/1.1" 200 676 "http://192.168.xxx.xxx/simple/"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.2.6; .NET CLR 1.0.3705)"
win98.tbrauch - - [07/Apr/2003:23:07:38 -0400] "POST /simple/simple2.py HTTP/1.1" 200 978
"http://192.168.xxx.xxx/simple/simple.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.2.6; .NET CLR 1.0.3705)"
win98.tbrauch - - [07/Apr/2003:23:08:27 -0400] "POST /simple/simple2.py HTTP/1.1" 200 978
"http://192.168.xxx.xxx/simple/simple.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.2.6; .NET CLR 1.0.3705)"

Note, win98.tbrauch is my windows computer.  I have tried accessing the files from it.  And, 192.168.xxx.xxx is the internal IP
address for my linux computer.

I feel like it might be a path or permissions problem, but I'm not really sure what to change.  I've been playing with Linux on my
own for about 5 months now, so I'm a newbie.

Oh, one more thing.  I tried:

[root@linux0 simple]# python simple2.py

And it worked fine, it sent the email and no errors.  However, when I try:

[root@linux0 simple]# ./simple2.py
: bad interpreter: No such file or directory

Other files work if I try ./file_name.py, even if I put them in the same directory, just not this one.

 - Tim