mod-python

Spell Checking Service with python using mod_python

What is the best available method for developing a spell check engine (for example, with aspell_python), that works with apache mod_python ? apache 2.0.59+RHEL4+mod_python+aspell_python seems to crash. Any alternative to using aspell_python ? ...

Django, mod_python, apache and wacky sessions

I am running a Django through mod_python on Apache on a linux box. I have a custom authentication backend, and middleware that requires authentication for all pages, except static content. My problem is that after I log in, I will still randomly get the log in screen now and again. It seems to me that each apache process has it's own py...

mod_python on CentOS under httpd and hsphere

I have asked our hosting provider to add mod_python to our httpd server. The server appears to be in an hsphere cluster and they appear to use yum to administer it. He is reporting some dependencies missing and I do't quite understand how that could have come about. versions (this is as much as I have been given): CentOS 5 apache - 2 ...

Is there a difference between installing mod_python via httpd.conf and conf.d in apache?

I am working with a hosting provider who has installed mod_python for me. I followed the install instructions locally and included it in httpd.conf but they have opted to put it in conf.d/python.conf. Is there any difference/benefit to doing it either way? ...

Failed to get separate instances of a class under mod_python

I'm trying to run some python code under Apache 2.2 / mod_python 3.2.8. Eventually the code does os.fork() and spawns 2 separate long-run processes. Each of those processes has to create a separate instance of a class in order to avoid any possible collision in the parallel flow. class Foo(object): pass kidprocs = [] for kid in ('...

How to make Apache/mod_python process collect its zombies?

Apache/2.2.6 (Unix) DAV/2 mod_python/3.2.8 Python/2.4.4 configured ... One of apache processes spawns some long-running python script asynchronously, and apparently doesn't seem to collect its child process table entry. After that long-run-in-subprocess python script finishes - defunct python process has been left. # ps -ef | grep htt...

A good multithreaded python webserver?

Hi, I am looking for a python webserver which is multithreaded instead of being multi-process (as in case of mod_python for apache). I want it to be multithreaded because I want to have an in memory object cache that will be used by various http threads. My webserver does a lot of expensive stuff and computes some large arrays which nee...

Python for web development in Apache

I've been playing with mod_python in apache2 which seems to work differently than python does in general - there's a bit different syntax and things you need to do. It's not very well documented and after a few days of playing with it, I'm really not seeing the point of mod_python at all, especially when things like php are so well docum...

Can you use mod_python with JBoss?

Anyone know whether it is possible to put mod_python under JBoss like you can Apache HTTPD? Given that JBoss has Tomcat inside it would seem to be a reasonable thing to do. If not mod_python is there any python support under JBoss which will keep the interpreter in memory? ...

How do you run Trac on a public server?

Since the TFS is too big for our project, we want to use subversion and Trac. The hosting environment is Windows 2003 and IIS. There are some options: Run tracd Run Apache with mod_python Run tracd with AJP Protocol and the isapi-redirector We tend to integrate Trac with IIS and the isapi-redirector. What would you suggest? ...

mod_python.publisher always gives content type 'text/plain'

I've just set up mod python with apache and I'm trying to get a simple script to work, but what happens is it publishes all my html as plain text when I load the page. I figured this is a problem with mod_python.publisher, The handler I set it too. I searched through the source of it and found the line where it differentiates between 't...

How to access to the root path in a mod_python directory?

In my Apache webserver I put this: <Directory /var/www/MYDOMAIN.com/htdocs> SetHandler mod_python PythonHandler mod_python.publisher PythonDebug On </Directory> Then I have a handler.py file with an index function. When I go to MYDOMAIN.com/handler.py, I see a web page produced by the index function (just a plain vanilla ...

Setting up Python on Windows/ Apache?

I want to get a simple Python "hello world" web page script to run on Windows Vista/ Apache but hit different walls. I'm using WAMP. I've installed mod_python and the module shows, but I'm not quite sure what I'm supposed to do in e.g. http.conf (things like AddHandler mod_python .py either bring me to a file not found, or a forbidden, o...

Why does my Django app not work with Apache/mod_python?

I have Apache setup to serve requests for http://www.mysite.com from this directory: /var/www/html/www.mysite.com The Django site is in /var/www/html/www.mysite.com/mysite. I get this error when I make a request for /mysite/app/foo: (big stack trace) AttributeError: 'module' object has no attribute 'common' 'myapp.common' is the fir...

Django Apache/mod_python Admin CSS not appearing with admin tables

I have Windows XP/Django/apache/mod_python working on localhost. All parts are working with the exception of the admin CSS not rendering. The admin works, but no html formatting. I've made additions in: settings.py INSTALLED_APPS 'django.contrib.admin', urls.py from django.contrib import admin admin.autodiscover() (r'^ad...

Reducing Django Memory Usage. Low hanging fruit?

My memory usage increases over time and restarting Django is not kind to users. I am unsure how to go about profiling the memory usage but some tips on how to start measuring would be useful. I have a feeling that there are some simple steps that could produce big gains. Ensuring 'debug' is set to 'False' is an obvious biggie. Can any...

Deploying django app on Apache mod_python

I've finished making a site in django called 'kazbah', and I'm trying to deploy. All the code for the kazbah site is in /home/git/DjangoProjects/kazbah and my httpd.conf looks like: <Location "/"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE kazbah.settings Python...

Invoking Wine From Apache

I have Apache/2.2.11 using mod_python 3.3.1/Python 2.5 running under Gentoo linux. In my python script I invoke a win32 exe using wine (os.popen2 call). This works fine outside of Apache but under mod_python I get: wine: cannot open /root/.wine : Permission denied in /var/log/apache/error_log. My apache install is not running as the...

How can I make sure that the urls work the same in built-in web-server and Apache

The situation is: I have Apache with mod_python on windows xp and my django project is not in the document root. The Django project location is defined with the tag. The django.root ist also defined there. All the urls work fine in the built-in server but unfortunately not in Apache. In some urls, especially the ones not pointing to the...

Setting up Django with mod_python, Apache on SuSE with Alias

Hello guys, 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 and insider.site.org The insider.site.org is the main one I'm concerned with. ...