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
0
votes
1 answer

how to configure apache2 mod_python

I am trying to configure apache with mod_python to run python scripts . I have tried many different configuration but none worked . my hello.py file seems like this from mod_python import apache def handler(req): …
0
votes
1 answer

Ajax load issues with space in url

I have 2 python files: gui.py & index.py python.py contains table with records from mysql database. gui.py contains python.py and textfield with button to send messages. Also, gui.py contains javascript that will load new python.py with…
sashaaero
  • 2,618
  • 5
  • 23
  • 41
0
votes
1 answer

Not able to access parts of imported .PY in a .PSP

I'm trying to load a weather plugin for a website I'm working on. The weather plugin is a separate weather.py file located at /var/www/piss/plugins/base/weather.py. In the PSP it seems to import correctly, but I am unable to access any variables…
chris
  • 135
  • 1
  • 5
0
votes
2 answers

Django and mod_python config

My Django project is placed in /www/host1/htdocs/my/project, www and my are links to other actual folders. Apache has mod_python enabled. I have a .htaccess in project folder: SetHandler python-program PythonHandler django.core.handlers.modpython…
zihaoyu
  • 5,483
  • 11
  • 42
  • 46
0
votes
1 answer

Making an asynchronous interface appear synchronous to mod_python users

I have a Python-driven web interface powered by Apache 2.2 with mod_python and Python 2.4. I need to make an asynchronous process appear synchronous to users of this web interface. When users access one module on this website: An external SOAP…
Trey Hunner
  • 10,975
  • 4
  • 55
  • 114
0
votes
1 answer

How can you message a background process from mod_python?

We're running a Linux server running Apache2 with mod_python. One mod_python script inserts an entry in a database logging table. The logging table is large can be a point of disk-write contention, or it can be temporarily unavailable during…
Andomar
  • 232,371
  • 49
  • 380
  • 404
0
votes
1 answer

Why does python not working?

I don't know why python isn't working with apache in ubuntu. I've got python and libapache2-mod-python installed. My default config file: Options Indexes FollowSymLinks MultiViews AlowOverride None Order allow,deny Allow from all #…
0
votes
1 answer

Trac logo and favicon 404

This is going to read similar to the other Trac static resource issues I found (pretty well encompassed by this SO question), but this doesn't appear to be the same issue. I have partial (non-root) access to a server with other Trac projects, and I…
user13803
  • 95
  • 6
0
votes
1 answer

How to run multiple versions of a Django app with mod_python?

I want to set up test and production versions of a Django app on separate apache name virtual hosts and wanted to know the best way to do this. Here's what I've done, and it seems to work ok, but I'm wondering if there's a better way.
John Mac
  • 2,530
  • 4
  • 24
  • 30
0
votes
1 answer

Python OpenID error: No matching endpoint found after discovering [uri]

I'm getting a "No matching endpoint found after discovering [openid identifier]" error when I invoke complete() method of the consumer. The funny thing is that out of the four OpenID providers I have tested, this behavior is observed only with…
dpq
  • 9,028
  • 10
  • 49
  • 69
0
votes
1 answer

Switching mod_python from using python2.4 to python2.5

My goal is to have Apache process a python script and output to the requesting client. My server has both Python2.4 and Python2.5.5 installed. I have Apache configured to correctly process python scripts and tested with a simple test script.…
Structure
  • 832
  • 1
  • 13
  • 22
0
votes
0 answers

Django settings_module becoming unset randomly?

I'm trying to figure out a really weird problem with this django program. Basically we have a django based app thats been split into a second app, mainly by loading the settings_sis.py file instead of the settings.py file, in the relevant site's…
user1279741
  • 127
  • 4
0
votes
1 answer

modpython django basic auth handler does not pass user to view

I'm using django with apache mod_python. I authenticate users via the basic auth handler (django.contrib.auth.handlers.modpython) [1]. My views get only an instance of AnonymousUser passed in request.user. What am I doing wrong? [1]: it's an API…
tback
  • 11,138
  • 7
  • 47
  • 71
0
votes
1 answer

UserDir on a django server

I have a django website running with mod_python and Apache. The current configuration directs all / traffic to the django site. Now, I need to enable userDir /~user on the machine as well. I have enabled the userDir module in Apache. Since, Apache…
Mir
  • 23
  • 4
0
votes
1 answer

mod_python not detecting files when using open()

I am trying to open a file I have in my /var/www/ directory named cardlist.xml. this is the code I am using. import cgi import os open("./cardlist.xml", "r") def crawlXml(): return 0 My error is MOD_PYTHON ERROR ProcessId: 11361…
user273114
  • 23
  • 1
  • 6