FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


python script???





elekis
hi, I try to use python script but I don't know why , that's doesn't work.

I have no idea if it's me or the server bad config.

there is the script.

Code:

#!/usr/bin/python
print "Content-Type: text/html"
print

print "Hello world !"



I putted that on cgi-bin folder and I tried to reach them with

http://elekis.frih.net/cgi-bin/test.py

but I have a Internal Server Error

is there a thing than I must do to use python script???

thanks

a+++
SpellcasterDX
I'm not sure whether Frihost supports Python at all.
Zage
FriHost only supports HTML, PHP, Pearl, and mySQL i think
Bondings
I changed the permissions to 755 instead of 777 and it seems to work now.

---

By the way, it doesn't have to be the cgi-bin. Try to add the following in a .htaccess file in the directory you want to put it.
Quote:
AddHandler python-program .py
PythonHandler elekis
PythonDebug On

And then in elekis.py you should put something like:
Quote:
from mod_python import apache

def handler(req):
req.send_http_header()
req.write("python is installed!")
return apache.OK


And yes we support python. As cgi or with mod_python.
elekis
thanks a lot

a++
elekis
in fact it is written on first page



a+++
Bondings
elekis wrote:
in fact it is written on first page



Yes, I put it there a few weeks ago.

Apparantly Ubuntu doesn't like our home page though. Confused
elekis
the first page never worked with me but I never said if it's was me or first page.

if others could try




a+++
Bondings
elekis wrote:
the first page never worked with me but I never said if it's was me or first page.

if others could try

Well I know it doesn't work out very well on other operating systems. It's because they have different default settings, I assume, like line hight and different fonts.
shalpin
The whole reason I came to this site was to try out python. I hadn't heard of this site until I was pointed to it by a listing on the python web site: http://wiki.python.org/moin/FreeHosts Smile
Bondings
shalpin wrote:
The whole reason I came to this site was to try out python. I hadn't heard of this site until I was pointed to it by a listing on the python web site: http://wiki.python.org/moin/FreeHosts Smile

Well if you have problems with using it, please create a new support thread about it. Very Happy
SurBiff
Hi!
i having some problems getting started with mod_python.
I getting info from this tutorial
but it seems that it doesnt work.
i get an error message that i cant figure out:

Code:
Mod_python error: "PythonHandler test_python"

Traceback (most recent call last):

  File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 185, in Dispatch
    object = resolve_object(req, module, object_str, silent)

  File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 394, in resolve_object
    raise AttributeError, s

AttributeError: module '/home/surbiff/domains/dunder.frih.net/public_html/testing/test_python.py' contains no 'handler'


i would be verry pleased if someone could point me in a direction here, my brain seems to standing still Smile
SurBiff
i've sorted it out, i whas reading the tutoriol for the wrong version. if it matters.

well well, any ways i've sorted it out now so no its just go get started and write some cool stuff Cool
Related topics
Python execute External Application. How?
php or python question about some processing.
Python and CPU load
website in python
What is the difference between CGI and python script?
Run python script
Python, CGI and CSS
Python script execution help [Serv. 3]
python programming
Writing to a file -- Python
Python hello world
Problem with python script
Python on Server 4 (?)
Anonymous FTP Scanner - Python Script
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.