mod-python

Problem to make an apache server run correctly under mod_python

Hello to all, We try to migrate our old server to a new one but we experienced some problems with mod_python. The problem is under this web page: http://auction.tinyerp.org/auction-in-europe.com/aie/ Here is our apache2 configuration: NameVirtualHost * <VirtualHost *> DocumentRoot /var/www/ <Directory /> Options FollowSymLin...

how to redirect to new page with javascript , after submit html form ?

hi all, i'm using html , javascript & mod_python i want to submit html form i used document.formName.submit(); after submitting i want to redirect to new page --i tried location="newpage.html" NOT working ...

psycopg2 and mod_python import error

I am trying to setup roundup on a windows XP machine. I use psycopg2 v2.0.13 and when i import the psycopg2 module from the shell it all works fine, but when mod_python tries to do it, I get this error: MOD_PYTHON ERROR ProcessId: 3464 Interpreter: 'roundup' ServerName: 'roundup' DocumentRoot: 'C:/Dev/roundup/tracker' U...

Installing mod_python on Snow Leopard

I'd rather not use Macports. Simply cause Macport replaces (installs another Apache in /opt/local/bin) the default installation of Apache. And that would mean having ports install/replace PHP too. I'd rather use the default installation included in Snow Leopard. Been searching the net, and all I get is old instructions using Darwin Port...

Setting mod_python's interperter

I have mod_python installed on a debian box with python 2.4 and 2.6 installed. I want mod_python to use 2.6 but it is finding 2.4. How can set it to use the other version. ...

mod_python req.subprocess_env not "seeing" PythonOptions

I'm having trouble getting an environmental variable out of apache config. (don't ask why it's being done this way, I didn't originally code it) This is what I have in the apache config. <Location "/var/www"> SetHandler python-program PythonHandler mod_python.publisher PythonOption MYSQL_PWD ########### PythonDebug On <...

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 from Python is this string; Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14) Gecko/200...

What do I need in order to save binary file post?

Hi, I have a client program that uploads files to the server. Initially I used POST method and have mod_python to save a uploaded file. Then, I found that a file might contain some special character so by the time my function is called, some of data have been cut off because I think that Apache is parsing data that I am POSTing. Thus, i...

mod_python is not loading stackless python

Hi, I have setup a apache2 mod_python environment with stackless python and it is working. And When I test the python environment with sys.version , it shows 2.5.2 Stackless 3.1b3 060516 (python-2.52:76701, Dec 8 2009, 02:13:34) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] in the browser But when I do "import stackless" it shows : MOD_PY...

Stackless python + apache + mod_python on ubuntu

Has anyone setup a apache2 and mod_python with stackless on ubuntu? If yes can you please post here the steps involved? Thanks in advance ...

Django mod_python deployment error

I'm trying to deploy a django project via mod_python and I keep getting an error saying a handler module is missing. My apache config: <Location /> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE bookmarklet_server.settings PythonOp...

How to call main() of a python script with arguments from mod_python.publisher ?

Hi, I use a mod_python publisher function which calls the main() function of another python script with a custom built argv list. When I execute the publisher script from shell command line it works. But when I tried it through apache2 with mod_python, I get the error (shown below) that main takes no arguments. File "/var/www/wabaSe...

How to make read-only data accessible by diff requests while the server is running (apache, mod_python)

Hello, I am using Apache/2.2.8 (Ubuntu) mod_python/3.3.1 Python/2.5.2 and I would like to preload the data I work with. Currently I read the data from a file on disk every time I get a request, then parse it and store it in an object. The data file is relatively large and I would like to parse/preload it ahead of time. I was thinking...

Configuring Web Authentication on Trac

Hello, I am on opensuse 11.1 and trying to configure admin access for Trac via the web interface. My site is http://trac.andydaykin.com. When I go to login, I get a page that just says "Trac Error". I have checked in the trac log and the only useful thing it does is point me back to the page on how to setup the authentication with mod_...

How can I configure Apache2/mod_python/Django to abort request processing after N seconds?

I recently spent a long while debugging something that turned out to be an infinite loop bug in my own code. Since I can't guarantee I'll never make that sort of mistake again, how can I configure my web server to terminate any apache2 subprocess that remains waiting for my python app to return a response for over N seconds? In this cas...

Running Different Django Versions But Sharing Authentication

Brand new to django. We have a legacy django project using django 0.96x that does authentication, ldap, etc., and it's pretty involved so we don't want to rewrite that code. We want to add a forum solution (off the shelf) but all of the ones I've seen so far require django 1.x I'm trying to figure out how to get this working and I've ...

How do you trace 500 server errors with Apache + mod_python + Django?

I'm randomly getting 500 server errors and trying to diagnose the problem. The setup is: Apache + mod_python + Django My 500.html page is being served by Django, but I have no clue what is causing the error. My Apache access.log and error.log files don't contain any valuable debugging info, besides showing the request returned a 500....

Django custom auth backend not recognized on Apache

I'm trying to deploy my Django application to an Apache2 based server with mod_python. I've set the handlers right and made the configuration to make mod_python work with my project. My project implements a custom auth backend to connect my users to twitter, and my backend implementation is on: myproject |- backends/ directory.Everyth...

Mod_Python + Django library import issue

Hello, I recently had a site that was running perfect for months, all of a sudden it decided to dump itself for no approximate reason. I am running django + mod_python + apache, and the system decided it was time to start ignoring the import of the pycurl library, my intial first thought was that somehow the library had become corrupte...

How to setup and run Python on Wampserver?

Can anyone help me to set up Python to run on Wampserver. From what I've read so far you would need to use a combination of Wampser, Python, mod_pyhton, and adjustment to the Apache http.conf file. I've tried it but i belive i am having conflict when it comes to versions. Does anyone know of a cobination of versions that can work so that...