473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

apache python newbie problem

I'm sorry to take your time for newbie problems but I've been searching what to do about the problem with my apache server I have. I work with ubuntu dapperdrake I put the last apache server on it and I tried to put the mod_python module to work. the only answer I got was that apache didn't find api structure in the module. afterwards I read I didn't need this module to work with python (only a speed difference as I understand) but the problem is nomatter where I put my .py file. everytime I trie to reach it I get a downloadable textfile instead of the execution of the file. I gave it the permission to execute with chmod but it seems I'm forgetting something else to make it work properly.

ubuntu 6.06LTS
apache2
python 2.4

to make the module mod_python work I changed apache2.conf
AddHandler mod_python .py
and I even tried changing httpd.conf but I got this as a result
Syntax error on line 6 of /etc/apache2/httpd.conf:
Can't locate API module structure `mod_python' in file
/usr/lib/apache2/modules/mod_python.so:
/usr/lib/apache2/modules/mod_python.so: undefined symbol:
mod_python

what concerns the textfile instead of the execution of the file.
I tried to put the file in the cgi-bin directory I made in /var/www, (didn't find the file) then I put it in the /usr/lib/cgi-bin directory and I only get the textfile if I try for instance http://127.0.0.1/cgi-bin/*.py

127.0.0.1 is the localhost while I don't have a domainname for it

I've been reading for several days now and I tried several things other people explained me but it doesn't work out wel for the moment.

greetings and thx in advance
Mar 6 '07 #1
1 4645
I'm sorry to take your time for newbie problems but I've been searching what to do about the problem with my apache server I have. I work with ubuntu dapperdrake I put the last apache server on it and I tried to put the mod_python module to work. the only answer I got was that apache didn't find api structure in the module. afterwards I read I didn't need this module to work with python (only a speed difference as I understand) but the problem is nomatter where I put my .py file. everytime I trie to reach it I get a downloadable textfile instead of the execution of the file. I gave it the permission to execute with chmod but it seems I'm forgetting something else to make it work properly.

ubuntu 6.06LTS
apache2
python 2.4

to make the module mod_python work I changed apache2.conf
AddHandler mod_python .py
and I even tried changing httpd.conf but I got this as a result
Syntax error on line 6 of /etc/apache2/httpd.conf:
Can't locate API module structure `mod_python' in file
/usr/lib/apache2/modules/mod_python.so:
/usr/lib/apache2/modules/mod_python.so: undefined symbol:
mod_python

what concerns the textfile instead of the execution of the file.
I tried to put the file in the cgi-bin directory I made in /var/www, (didn't find the file) then I put it in the /usr/lib/cgi-bin directory and I only get the textfile if I try for instance http://127.0.0.1/cgi-bin/*.py

127.0.0.1 is the localhost while I don't have a domainname for it

I've been reading for several days now and I tried several things other people explained me but it doesn't work out wel for the moment.

greetings and thx in advance

thanks any how but I solved the problem by reinstalling my apache2 server and apache common server, it seems the conf files were scrammbled up.
Mar 7 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: John Dean | last post by:
Hi I have set up httpd.conf according to installation and configuration instructions in the mod_python documentation. Yet when I enter the following URL http://localhost/test.py all I get is an...
0
by: Greeshma | last post by:
Hi all, I have successfully configured Apache 2.0.4 with RedHat 7.3 and use Python 2.2.3 for cgi scripts. When I start Apache manually through /usr/local/apache/bin/apachectl startssl, I can...
23
by: Simon Wittber | last post by:
For the first time, I have been bitten by Python. The below code produces the results: False True when I initially expected the results: False False It took me a while to work out that...
2
by: Christian | last post by:
Hello, i have an apache 1.3 server with python on debian. Python works fine but the scripts wont´t work. This easy script i want to do on apache: #!/usr/bin/python import os os.getcwd()
1
by: neha | last post by:
hi, i m trying to integrate python with apache on linux.For this i m using mod_python. I dont see any problem with the versions of python,apache and mod_python i m using. the versions i m using...
5
by: m.banaouas | last post by:
Hi, bonjour, witch versions are suitable to use for apache & mod_python ? Can i install and use "Apache 2.2.3" & "mod_python 3.2.10" (most recent versions) without facing any known major...
3
by: falloutphil | last post by:
Hi, First of all sorry for the double post - this is on the Python page too, but as far as I can see this is an Apache issue now. Mods - feel free to delete the similar titled posts from me on...
1
by: NccWarp9 | last post by:
Hello, im using Apache HTTPD 2.2.8 with mod_python/3.3.1 Python/2.4.3 on Windows and having truble starting pythone, any help would be appreciated .. Im getting this error: ...
30
by: Ivan Reborin | last post by:
Hello everyone, I was wondering if anyone here has a moment of time to help me with 2 things that have been bugging me. 1. Multi dimensional arrays - how do you load them in python For...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.