mod-python

Configure Apache to recover from mod_python errors [duplicate]

落爺英雄遲暮 提交于 2019-12-12 01:17:42
问题 This question already has an answer here : Testing for mysterious load errors in python/django (1 answer) Closed 4 months ago . 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 using the module that the problem

Error in starting apache2 server while configuring for python

大憨熊 提交于 2019-12-11 04:46:14
问题 Hello i'm trying to configure apache2 server for python, i used this command to install apache2: sudo apt-get install apache2 cd /etc/apache2/mods-enabled/ sudo ln -s ../mods-available/mod_python.load mod_python.load cd /etc/apache2/sites-available/ sudo gedit default edited the default file to: <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride AuthConfig Order allow,deny allow from all AddHandler mod_python .py PythonHandler mod_python.publisher PythonDebug On #

how to add python path in mod_python

ε祈祈猫儿з 提交于 2019-12-11 03:04:37
问题 Hi I am using mod_python and I have a python module AA in a directory X and in directory X I have sub directories which has other modules which are imported in AA. I am importing AA in BB. when I run BB it fails to load modules imported in AA. It's a python path issue, but the issue is how to dynamically set the path to the users workspace. the workspace differs for each users. Please help me on this. to update I am using sys. path.append(classpath) in my BB script but still it fails. my

psp (python server pages) code under mod_wsgi?

…衆ロ難τιáo~ 提交于 2019-12-11 00:24:18
问题 Is there some way to run .psp (python server pages) code under apache + mod_wsgi? While we are moving towards newer wsgi based frameworks we still have some legacy code written in psp which runs under mod_python. We'd like to be able to run it on the same server that hosts other wsgi based python code. In short - is there a way to support psp under mod_wsgi? Or are there any other tricks to at least allow mod_wsgi and mod_python to play nice in the same server? -S 回答1: No, there is no port of

How do I modify sys.path from .htaccess to allow mod_python to see Django?

半世苍凉 提交于 2019-12-09 18:42:11
问题 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 my user space) by modifying sys.path, but I don't know how to change it from .htaccess or mod_python. How do I modify sys.path from .htaccess to allow mod

How to setup and run Python on Wampserver?

*爱你&永不变心* 提交于 2019-12-09 15:14:03
问题 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 i can do some local python development using my wampserver? Links to the download would be greatly appreciated. My current config: Wampserver 2.0c => Apache

Django on Apache web server 'dict' object has no attribute 'render_context'

筅森魡賤 提交于 2019-12-08 19:42:28
问题 I'm having a bit of a problem, I uploaded my Django project to a webserver running apache, mod_python, and django. On the computer I developed on the following works fine nameBox = getNamesBox().render(locals()) - def getNamesBox(): users = User.objects.filter() templateString = '<select name="name box">' for user in users: templateString += '<option value="' + user.name + '"> ' + user.name + '</option>' templateString += '</select>' template = Template(templateString) return template But on

apxs:Error: Command failed with rc=65536

五迷三道 提交于 2019-12-08 19:33:56
问题 Centos 6.4, WHM 11.38.1 I'm having trouble trying to make mod_python work. I'm getting this error apxs:Error: Command failed with rc=65536 I've already tried custom_easyapache_modules . Also tried downloading the tar.gz and ./configure --with-apxs=/usr/local/apache/bin/apxs make && make install I also tried (https://bugzilla.redhat.com/show_bug.cgi?id=465246) to fix /src/connobject.c Always the same message. 回答1: https://code.google.com/p/modwsgi/wiki/InstallationIssues http://www

Catching errors when logging with SocketHandler in Python

折月煮酒 提交于 2019-12-07 14:31:53
问题 My web application runs on multpile apache instances and I am having multiprocess logging issues because of this. I am currently using a SocketHandler for logging to a daemon using SocketServer that then writes logs to a single log file (similar to this example). Now that I am using a SocketHandler for logging I am having trouble discovering if/when the socket server crashes. For example, if I try creating a SocketHandler for a port that has no listening socket server, no exception arises. I

deploying a WSGI application on mod_python

巧了我就是萌 提交于 2019-12-07 04:08:31
问题 I wrote a WSGI application which I need to deploy to a server, however I've been given a server that already has mod_python installed. I am not allowed to remove mod_python since there are some mod_python applications running on it already. One option I considered was installing mod_wsgi alongside mod_python, however I went through sources and found that was a bad idea. Apparently mod_wsgi and mod_python don't mix well. Another option I considered was installing mod_fastcgi and deploying it