Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Got Python web host, yay! Now what? (http://www.velocityreviews.com/forums/t321295-got-python-web-host-yay-now-what.html)

Robert Oschler 08-21-2003 04:47 PM

Got Python web host, yay! Now what?
 
I found a good web host that has Python 2.x support and I've set up an
account. It's LunarPages.com if you're interested . Do I have to do
anything special to run Python scripts, besides upload the script to the
cgi-bin directory? If so, please direct me to a good web page or doc that
goes into the necessary details.

thx

--

Robert Oschler
"Let the web hear you, add your voice to your web site in minutes!"
-- http://audiodirect.spiderchase.com/
(For a limited time, free voiceover with every sign-up, use this link
instead)
-- http://audio.spiderchase.com/
(A song - are you blue?)
-- http://bluedreams.spiderchase.com/



Sheila King 08-21-2003 06:19 PM

Re: Got Python web host, yay! Now what?
 
On Thu, 21 Aug 2003 16:47:07 GMT, "Robert Oschler"
<no_replies@fake_email_address.invalid> wrote in comp.lang.python in
article <fI61b.13939$2Y6.4363673@news2.news.adelphia.net >:

> I found a good web host that has Python 2.x support and I've set up an
> account. It's LunarPages.com if you're interested . Do I have to do
> anything special to run Python scripts, besides upload the script to the
> cgi-bin directory? If so, please direct me to a good web page or doc that
> goes into the necessary details.
>
> thx


This will depend on the set up that your web host provides.

On the server where I host, I simply upload my scripts to cgi-bin and they
run.

However, I recently helped someone set up a script on a different server,
and after a couple of hours of tearing our hair out, we found out that on
that server, all scripts had to be renamed to have a .cgi extension, or
they would not run. (I've usually run my scripts with a .py extension.)

So, you should check with your host to find out what requirements they may
have for running cgi scripts.

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/


Tyler Eaves 08-22-2003 02:24 AM

Re: Got Python web host, yay! Now what?
 
On Thu, 21 Aug 2003 16:47:07 +0000, Robert Oschler wrote:

> I found a good web host that has Python 2.x support and I've set up an
> account. It's LunarPages.com if you're interested . Do I have to do
> anything special to run Python scripts, besides upload the script to the
> cgi-bin directory? If so, please direct me to a good web page or doc that
> goes into the necessary details.
>
> thx
>
> --
>
> Robert Oschler



3 things to watch out for

1. Make sure permissions are set to 755 (chmod 755 yourscript.py)

2. Make sure the 'bang' line (the first line of the file) is correct.
If python is at /usr/bin/python, the first line of the file should
be exactly #!/usr/bin/python

3. Make sure your script outputs a Content-type (and possibly other, as
needed) headers.

Code sample:

print 'Content-type: text/html'
print ''



All times are GMT. The time now is 07:50 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.