[EMAIL PROTECTED] wrote:
Your file probably need to (a) be in the cgi-bin, not public_html,

(b)

be flagged executable ("chmod a+x file.py"), and (c) begin with the
line: '#!/usr/bin/env python'

If the server doesn't provide you with CGI (or, strongly preferable,
SCGI or mod_python), you're probably out of luck.


You're probably right, this machine doesn't provide with CGI, I'll send
an e-mail to administrator of arbornet.org and make sure.

So, I ask once again: does anyone know where I can put my *.py files?
Greetings.
Rootshell.

Hi, I just made a cgi script on rht earbornet machine.

Process as follows

mkdir public_html
chmod 0755 public_html

cd public_html
mkdir cgi-bin
chmod 0755 cgi-bin
echo hello world > index.html
cd cgi-bin
echo '#!/bin/sh
> echo content-type: text/html
> echo
> echo "<html><head></head><body><h1><font color=red>Hello World!</font></h1></body></html>"
> ' > hw.cgi


chmod a+x hw.cgi

then

http://m-net.arbornet.org/~rgbecker/cgi-bin/hw.cgi

gives a nice red hello world ie acts as a cgi script

I also created the standard echo script

pytestcgi.cgi

as

#!/usr/local/bin/python
import cgi
cgi.test()

chmodded as before. See

http://m-net.arbornet.org/~rgbecker/cgi-bin/pytestcgi.cgi


Please don't misuse it's free and I'm no longer an American :) -- Robin Becker

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to