Questions tagged [mod-python]

Mod_python is an Apache module that embeds the Python interpreter within the server.

Mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python that will run many times faster than traditional CGI and will have access to advanced features such as ability to retain database connections and other data between hits and access to Apache internals.

Currently mod_python is not under active development. This does not mean that it is "dead" as some people have claimed. It smiply means that the code and the project are mature enough when very little is required to maintain it.

Projects website:

Current State of Mod_Python

289 questions
4
votes
2 answers

Get client ip with python

I'm a newbie in python. I want to write a simple web that prints the client ip on screen my http.conf Handler: AddHandler mod_python .py PythonHandler mod_python.publisher PythonDebug On The cgi.escape(os.environ["REMOTE_ADDR"]) return…
Elad
  • 479
  • 3
  • 11
  • 21
4
votes
1 answer

cgi.FieldStorage always empty - never returns POSTed form Data

This problem is probably embarrassingly simple. I'm trying to give python a spin. I thought a good way to start doing that would be to create a simple cgi script to process some form data and do some magic. My python script is executed properly by…
Dan Carlson
  • 996
  • 1
  • 12
  • 18
4
votes
1 answer

How to access a query parameter ("$_GET") in mod_python?

I want to know how to show requests ($_GET) on a python script ? Note that i am using mod_python as basic web server running with apache2 on UBUNTU server. If you have any idea your help will be very appreciated :) Other python web server like…
user3818090
  • 123
  • 8
4
votes
1 answer

Djangobb problem

I've installed Djangobb app on my server (Debian, mod_python) by cloning original source. The only things I've changed is database options in settings.py. All needed components are installed - syncdb query was executed right. But, when I'm trying to…
Djero
  • 41
  • 2
4
votes
2 answers

Catching errors when logging with SocketHandler in Python

My web application runs on multpile apache instances and I am having multiprocess logging issues because of this. I am currently using a SocketHandler for logging to a daemon using SocketServer that then writes logs to a single log file (similar to…
Trey Hunner
  • 10,975
  • 4
  • 55
  • 114
4
votes
3 answers

Browser Detection Python / mod_python?

I want to keep some statistics about users and locations in a database. For instance, I would like to store "Mozilla","Firefox","Safari","Chrome","IE", etc... as well as the versions, and possibly the operating system. What I am trying to locate…
cka
  • 93
  • 1
  • 7
4
votes
1 answer

Does Apache really "fork" in mod_php/python way for request handling?

I am a dummy in web apps. I have a doubt regaring the functioning of apache web server. My question is mainly centered on "how apache handles each incoming request" Q: When apache is running in the mod_python/mod_php mode, then does a "fork" happen…
Vivek Jha
  • 1,520
  • 3
  • 16
  • 26
4
votes
4 answers

Problems running beautifulsoup4 within Apache/mod_python/Django

I'm was trying to render an HTML-page on the fly using BeautifulSoup version 4 in Django (using Apache2 with mod_python). However, as soon as I pass any HTML-string to the BeautifulSoup constructor (see code below), the browser just hangs waiting…
Niklas9
  • 8,816
  • 8
  • 37
  • 60
4
votes
1 answer

How do I delete mod_python?

I keep getting these errors in my Apache logs: [error] python_init: Python version mismatch, expected '2.6.5+', found '2.6.6'. [error] python_init: Python executable found '/usr/bin/python'. [error] python_init: Python path being used…
user1492385
  • 105
  • 1
  • 9
3
votes
1 answer

Install mod_python for Apache 2.2.21, Python 2.5.4 on Mac OS X 10.6

I was able to install apache & python successfully from source. I installed mod_python with following configure command: ./configure --prefix=/usr/local/python/lib/python2.5/site-packages/mod_python --with-apxs=/usr/local/apache/bin/apxs…
Jigar
  • 3,256
  • 1
  • 30
  • 51
3
votes
1 answer

Web content filter with Apache + mod_wsgi?

I'd like to write a simple web content filter with flexible filtering rules that are written in Python. The filter is to be used as a forward proxy. Now, I have trouble choosing the right tools for this. What do you think would be a good set of…
python dude
  • 7,980
  • 11
  • 40
  • 53
3
votes
1 answer

How do I upload a file with mod_python?

I want to create a simple file upload form and I must be completely incapable. I've read docs and tutorials,but for some reason, I'm not getting the submitted form data. I wrote the smallest amount of code I could to test and it still isn't working.…
scottm
  • 27,829
  • 22
  • 107
  • 159
3
votes
3 answers

Setting up Django with mod_python, Apache on SuSE with Alias

I'm having major problems getting Django working with my Apache configuration. I did not create the server, so I don't have too much leeway as to how the server works. Essentially there are three virtual hosts: board.site.org, students.site.org…
Paul Zaczkowski
  • 2,848
  • 1
  • 25
  • 26
3
votes
1 answer

How to create folder to the network computer using os.mkdir() python command on apache?

I am using Win2008 server + Apache2.2 + mod_python. I would make a folder using string value from the web form. It works in local drive os.mkdir('D:\\temp\\" + folederName)` But it does not work on network - os.mkdir('\\\\192.168.131.200\\temp\\"…
Joon
  • 31
  • 1
  • 2
3
votes
1 answer

Installing Cobbler on Ubuntu 15.10 seems to break apache, how can I fix this?

I am trying to install Cobbler on a brand new Ubuntu 15.10 virtual box but it is not working. When I run the apt-get install cobbler cobbler-web it seems to break apache completely to the point I can't get it working again. I see this in the apache…
Chris Seline
  • 6,943
  • 1
  • 16
  • 14
1 2
3
19 20