This is the opposite problem from most about which I have read. I am running Ubuntu 8.04 on an Amazon instance with Apache 2.2.8 and I can't figure out why setting AllowOverride to None for root doesn't stop my .htaccess file from being included.
I have a sub-directory with hello.py in it and an .htaccess file. When I browse to the file...
I've deployed trac using apache/mod_wsgi (no SSL) (preferable, since the
problem I'm facing with CGI is performance), and it works fine WITHOUT SVN
integration. But I actually need SVN, so when I configure the repository
path (i.e: repository_dir = c:/projects/svn/my_project) I can't even get my
project TRAC to even open any of its pages...
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. Any ideas what's wrong?
def index():
html = '''
<html>
<body>
<form ...
I have had django running with mod_python for awhile now but today I get the following error
MOD_PYTHON ERROR
ProcessId: 4551
Interpreter: 'thatch'
ServerName: 'thatch'
DocumentRoot: '/var/www/thatch'
URI: '/'
Location: '/'
Directory: None
Filename: '/var/www/thatch/'
PathInfo: ''
Phas...
My website is written in Python and currently runs under mod_python with Apache. Lately I've had to put in a few ugly hacks that make me think it might be worth converting the site to mod_wsgi. But I've gotten used to using some of mod_python's utility classes, especially FieldStorage and Session (and sometimes Cookie), and from a scan o...
I'm new at this, however, when it comes to configuring mod_python/apache or wsgi/apache I suffer.
I've been able to use the python debugger tool.. pdb.set_trace() to success, especially when using the django development server, i.e. it out puts to the terminal all of the server activity, including the pdb interface.
So, how does one do...
I have a small Django website which I am trying to run on an Apache 2.2 HTTP-Server.
The application is running fine using "python manage.py runserver".
Django Version: 1.0.2 final
Python: 2.5
OS: Windows 2000
I wen't through the steps described in the documentation and after some fiddling, came out with the following in my httpd.con...
I'm trying to get mod-python to work with apache2 but not having any success. I've followed a few tutorials for getting mod-python working but I can't see what I'm doing wrong.
When I visit http://site.example.com/cgi-bin/test.py I actually get my 404 page! (whereas I get a 403 forbidden if the file really doesn't exist)
Here's my set...
I have a django application using mod_python, fairly typical configuration except that media files are being served by a (I know, not recommended) 'media' directory in the document root. I would like to test and maybe deploy with mod_wsgi but I cannot figure out how to create something simple to serve static files. mod_python allows th...
The host I'm considering for hosting a Django site has mod_python installed, but does not have Django. Django's INSTALL file indicates that I can simply copy the django directory to Python's site-packages directory to install Django, so I suspect that it might be possible to configure Python / mod_python to look for it elsewhere (namely ...
I'm new to mod_python and Apache, and I'm having trouble returning a file to a user after a GET request. I've got a very simple setup right now, and was hoping to simply open the file and write it to the response:
from mod_python import apache
def handler(req):
req.content_type = 'application/octet-stream'
fIn = open('response...
What is the standard way to make python's logging module work with apache/modpython?
I want to call mylog.warn('whatever') and have that result in a call to req.log_error() where req is the modpython request.
Is there an easy way to set this up?
...
python setting at httpd.conf:
<Directory "C:/depot/projects/web/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
AddHandler python-program .py
PythonHandler mod_python.publisher
PythonPath "['C:/Python25/Lib/site-packages/mod_python/',]+sys.path"
PythonDebug O...
Hi all,
I am new to Python (I am getting out of PHP because of how increasingly broken it is), and I am racing through porting my old code. One thing:
I have a file /foo.py with functions index() and bar(), so, with the publisher I can access http://domain/foo/bar and http://domain/foo as the documentation suggests.
How can I have it ...
I poked around the mod_python website and I only found the files for Python 2.5 and earlier for Apache HTTP Server 2.2. I Googled around a little, without significant luck. Any suggestions?
...
I am writing a minimal replacement for mod_python's publisher.py
The basic premise is that it is loading modules based on a URL scheme:
/foo/bar/a/b/c/d
Whereby /foo/ might be a directory and 'bar' is a method ExposedBar in a publishable class in /foo/index.py. Likewise /foo might map to /foo.py and bar is a method in the exposed cla...
Why mod_python is oop but mod_php is not ?
Example :We go to www.example.com/dir1/dir2
if you use mod_python apache opens www/dir1.py and calls dir2 method
but if you use php module apache opens www/dir1/dir2/index.php
...
We have a nasty problem where we see that the python logging module is behaving differently when running with mod_python on our servers. When executing the same code in the shell, or in django with the runserver command or with mod_wsgi, the behavior is correct:
import logging
logger = logging.getLogger('site-errors')
logging.debug('log...
I am hosting a Django app on Apache using mod_python. Occasionally, I get some cryptic mod_python errors, usually of the ImportError variety, although not usually referring to the same module. The thing is, these seem to come up for a single forked subprocess, while the others operate fine, even when I force behavior that requires usin...
Hello all, this one is hard to explain!
I am writing a python application to be ran through mod_python. At each request, the returned output differs, even though the logic is 'fixed'.
I have two classes, classA and classB. Such that:
class ClassA:
def page(self, req):
req.write("In classA page")
objB = ClassB()
...