mod-python

Matplotlib and WSGI/mod_python not working on Apache.

Everything works as supposed to on the Django development server. In Apache, the django app also works except when matplotlib is used. Here's the error I get: No module named multiarray. Exception Type: ImportError Exception Value: No module named multiarray Exception Location: /usr/share/pyshared/numpy/core/numerictypes.py in <modu...

Using pam_python in a script running with mod_python

Hi ! I would like to develop a web interface to allow users of a Linux system to do certain tasks related to their account. I decided to write the backend of the site using Python and mod_python on Apache. To authenticate the users, I thought I could use python_pam to query the PAM service. I adapted the example bundled with the module ...

mod_python with Python 2.6 on Windows

How do I install mod_python to run with Python 2.6 on a Windows machine? I could not find an installer for Python 2.6. I downloaded this installer for (mod_python on Python 2.5): mod_python-3.3.1.win32-py2.5-Apache2.2.exe and extracted it to get PLATLIB and SCRIPTS folders. Where do I go from here? ...

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 interface will be contacted with a unique identifier and will respond with a number N The e...

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 SetEnv DJANGO_SETTINGS_MODULE project.settings PythonDebug On PythonOption django.root ...

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 or objects from the weather.py plugin in the PSP. Here's the code I have: ...HTML an...

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 apache using mod_python, and will print out whatever I want it to print out. My only pro...

Django and mod_python intermittent error?

I have a Django site at http://sm.rutgers.edu/relive/af_api/index/. It is supposed to display "Home of the relive APIs". If you refresh this page many times, you can see different renderings. 1) The expected page. 2) Django "It worked!" page. 3) "ImportError at /index/" page. If you scroll down enough to ROOT_URLCONF part, you will s...

progress code :pdf

how to do left and right justitfied in progress i have a black background ,want my wording to be white ...

Web programming: Apache modules: mod_python vs mod_php

Hi! I've been using for more than 12 years PHP with Apache (a.k.a mod_php) for my web development work. I've recenlty discovered python and its real power (I still don't understand why this is not always the best product that becomes the most famous). I've just discovered mod_python for Apache. I've already googled but without success t...

Get client ip with python

Hi, 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 this error: KeyError: 'REMOTE_ADDR' and I just get lost with the BaseHTTPRequestHandl...

SQLAlchemy Expression Language problem

I'm trying to convert this to something sqlalchemy expression language compatible, I don't know if it's possible out of box and are hoping someone more experienced can help me along. The backend is PostgreSQL and if I can't make it as an expression I'll create a string instead:: SELECT DISTINCT date_trunc('month', x.x) as date, ...

mod_python can't see my Django project settings file

Hey, I need to deploy my Django application on my apache server, I've added the following to my httpd.conf: <Location "/dashboard/"> SetHandler python-program PythonHandler django.core.handlers.modpython PythonPath "['/home/firas/project/trunk/dashboard/analytics','/home/firas/project/trunk/dashboard', '/home/firas/project/...

Django-modpython deploying project

Hi All, I am deploying a Django project on apache server with mod_python in linux. I have created a directory structure like: /var/www/html/django/demoInstall where demoInstall is my project. In the httpd.conf I have put the following code. <Location "/django/demoInstall"> SetHandler python-program PythonHandler django.core.han...

mod_pyhton using wrong version

So redhat uses python 2.4 and I need to upgrade to python 2.6 (so I did an altinstall) does anybody know how to install mod_python? (I am installing from source.) This is what I ran: ./configure --with-apxs=/usr/sbin/apxs ./configure --with-python=/usr/local/bin/python2.6 make make install But according to a stack trace I get mod_pyth...

About deploying a Django project on Apache + mod_python

Hey, I had problems deploying a Django project - Review Board. I did what the document says and but got "Error 403" errors when I tried visiting the site. Maybe I should have posted this question on serverfault.com, but I think this may help people write/deploy Django application in general. Here is the installation: I installed Revie...

mod_python and subpackages importing issues: ImportError: No module named...

Hello, I'm exploring mod_python and I'm having trouble with the package importing. I've a structure like this: my base dir | +- __init__.py +- index.py +- package (directory) | +- __init__.py +- package.py (file) and an Apache Virtual Host like this: <VirtualHost *:80> Serv...

correct configuration for apache and mod_python

hi all, how you must configure Apache 2.2 or mod_python?, to avoid the following error: MOD_PYTHON ERROR ProcessId: 5399 Interpreter: '127.0.1.1' ServerName: '127.0.1.1' DocumentRoot: '/var/www' URI: '/cgi-bin/wps/' Location: None Directory: '/usr/lib/cgi-bin/' Filename: '/usr/lib/cgi-bin/wps/' ...

Mod_python on django and debug variable

Hi, I have a problem with my django application. On django developer server its work perfect, but when I switch it to apache something strange happening. Lets check the code: class Criteria(models.Model): district = models.ManyToManyField(District, verbose_name=u"Województwo", blank=True) respondents = models.ManyToManyField(Us...

mod_python for python 2.7

I recently downloaded python 2.7 on my computer (x64) and I would like to install mod_python for it (I have apache 2.2), however, I can't find a mod_python release supporting python 2.7. Has development stopped? If so, what should I use instead? ...