473,756 Members | 3,051 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

apache python newbie problem

2 New Member
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 4680
wadacom
2 New Member
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
2180
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 Apache view of my htdocs directory. They if I click on test.py and open file dialog pops up. If I give the file a cgi extension and enter the following URL http://locathost/test.cgi it runs fine. I just can't figure out what I am doing wrong. --
0
1484
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 execute the cgi scripts without any problem from the browser. This works fine. When I put the Apache start line in /etc/rc.local file so that Apache starts automatically at boot time, Apache starts without any problem, and I can access the...
23
1908
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 default keyword argument values
2
2293
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
2790
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 are apache version2. mod_python v3.1.14 python2.4 The problem is,when i m running my python script,after starting apache
5
3117
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 issue ? thanks for any help.
3
8510
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 Python, if this is the case (can't seem to do it myself!). Anyway, I'm running a CGI script written in python that tars up the photos in user selected directories (via a form). It's running on Apache 1.3.31.1 on Solaris 5.8. It works well for a...
1
4285
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: make_obcallback: could not import mod_python.apache.\n
30
2726
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 example, if I had: ------- 1 2 3 4 5 6
0
9273
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10032
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9872
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9841
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9711
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8712
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7244
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5303
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.