288 questions
1
vote
0
answers
181
views
How to avoid caching in freeswitch mod_python3?
developing python applications for freeswitch I'm currently struggling with the python cache feature. In my dailplan I'm calling a python script using mod_python3. That script imports further modules ...
0
votes
0
answers
73
views
np.histogram outputs?? - Python
Trying to understand what kind of output do I get from the histogram function.
phase = mod(phase,Nper*2*pi)
cl_phase = arange(0,Nper*2*pi+step,step)
c,p = histogram(phase,cl_phase)
while 0 in c:
...
0
votes
0
answers
624
views
Checking mod_python library version on CentOS7
I'm new to Linux and LAMP stack.
I'm trying to install PyAuthenNTLM2 on CentOS 7.8 VM.
One of it's prerequisites is to have mod_python installed.
However, I'm not sure if this mod_python is already ...
0
votes
2
answers
832
views
How to secure media files in django in poduction?
I am trying to make a project and have some media files which should only be accessed by their owner.
In production, media and static files are served by apache (or nginx but I am using apache).
I was ...
2
votes
1
answer
1k
views
FreeSwitch(1.6.20) modules.conf file not found
I installed FreeSwitch 1.6.20 and trying to use mod_python module as described on the FreeSwitch Documentation. During this, I did not find the modules.conf file. So mod_python is not installing. I am ...
1
vote
1
answer
1k
views
AddHandler directly in .htaccess
In this solution, I installed and enabled mod_python.
Why doesn't adding this in .htaccess
AddHandler mod_python .py
PythonHandler mod_python.publisher
work?
It works if I add this in a <...
0
votes
1
answer
194
views
Is it possible to use dash framework with existing mod_python framework or pyramid framework to deploy dash's graphical feature on a web page?
I'm trying to test out graphical features such as graphs and charts to be added to a web page. I am wondering if it is possible to use the dash framework with the existing frameworks that I know such ...
1
vote
0
answers
194
views
FreeSWITCH can't parse XML with serving mod_python
I'm trying to serve XML configuration through mod_python in FreeSWITCH. However, sometimes FreeSWITCH can't parse my XML and sometimes it can.
I am sure my XML config is true, I created a static file ...
0
votes
1
answer
347
views
Is it possible to set headers inside an Apache output filter?
We're using Apache 2.4 with mod_python, which is used for an output filter that is rewriting some of the HTML output. We're currently setting cookies using document.cookie in JS, but this isn't ...
1
vote
0
answers
88
views
non-DB backend for Django Apps
I'm trying to integrate wsgi Python app into a Django app as a controller - The App will provide the output and input (eg. as a dictionary) and send the data to view/controller.
I do not need a DB ...
0
votes
1
answer
1k
views
ImportError: cannot import name ResponseError
I am trying to use mod_python.
however when i try to access my page I get following error.
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", ...
0
votes
1
answer
171
views
Authentication with mod_python without login credentials popup
I am using Centos server with apache server.
I have added python script that reads my website's login cookie and based on that it return apache.OK or apache.HTTP_UNAUTHORIZED.
However even if cookies ...
0
votes
1
answer
434
views
Django website on VPS with WHM CPanel
What's the difference between mod_wsgi and mod_python.
In order to publish django websites on VPS, which one should I install on VPS?
0
votes
1
answer
70
views
How to pass informations from mod_python to CGI scripts
I use mod_python for my own custom authentication mechanism like this:
# apache/conf/conf.d/mod_python.conf
<Directory some/path>
PythonAccessHandler myhandler::myhandler
Options +...
-1
votes
1
answer
975
views
How can I pass parameters to python?
The python parameter is not passed.
I think cgi.FieldStorage () does not seem to work.
What settings should I add?
cgi.html :
<form action="cgi.py" method="get">
First Name: <input type="...
8
votes
4
answers
1k
views
How to send data via POST or GET in Mod_Python?
With JS, i send a AJAX post request.
$.ajax(
{method:"POST",
url:"https://my/website/send_data.py",
data:JSON.stringify(data),
contentType: 'application/json;charset=...
0
votes
1
answer
140
views
mod_python returns a blank screen
I'm trying to run mod_python.publisher in apache2. All I want to do is simply print "Hello World"
When I run my program, I get a blank screen.
My .py program looks like this:
def index():
print ...
1
vote
0
answers
383
views
mod_python.dll into server: % 1 is not a valid win32 application
i want to Integrate python module with Apache HTTP server. I downloaded mod_Python and moved to python Lib folder. In order to integrate python with the Apache server modules i downloaded mod_python....
0
votes
0
answers
454
views
Can't get mod_python and web.py to work, AttributeError: 'module' object has no attribute 'main'
I didn't do the Apache setup for this it was done by the hosting company and apparently they don't know that much about Python and mod_python, so I'm stuck I only have access to a .htaccess file and ...
0
votes
1
answer
364
views
Unable to install mod_python with homebrew on macOS Sierra
i tried to install mod_python but got error, than i tried use this solution but error still exist
...
Building mod_python.so.
/usr/sbin/apxs -I/private/tmp/mod_python-20161017-58272-9mx4n3/...
1
vote
0
answers
197
views
How to hook requests in Apache, run a script to validate session cookies and redirect to login if fail
My problem:
I have a simple website running with Apache, static HTML and some Perl scripts.
Now, I have to add login and password protection.
Users will login in an external server (in the same HTTP ...
1
vote
1
answer
956
views
Enable mod_python and mod_wsgi module
Can I use mod_python.so and mod_wsgi.so at the same time on Apache Web Server defining different directories for each of them. At the moment I can not enable them both in my apache config file at the ...
3
votes
1
answer
3k
views
Installing Cobbler on Ubuntu 15.10 seems to break apache, how can I fix this?
I am trying to install Cobbler on a brand new Ubuntu 15.10 virtual box but it is not working. When I run the apt-get install cobbler cobbler-web it seems to break apache completely to the point I can'...
0
votes
0
answers
34
views
Can mod_python respond to /user/123/doc/456/ style URLs?
We're using mod_python for most of our scripts. Now we're being asked to implement an API that accesses URL's like:
http://example.com/app/user/123/doc/456
We'd like to handle this in our existing ...
0
votes
1
answer
526
views
WSGI Python adapter to test FastCGI: Error starting WSGI server
When I'm trying to run the WSGI Python script to test FastCGI from this tutorial:
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from cgi import escape
import sys, os
from flup.server.fcgi import ...
0
votes
1
answer
386
views
How to run a Python script upon button click using mod_python without changing browser window
I am using mod_python publisher which is set up and working fine. It allows me to run a Python file in my browser and this Python file has HTML embedded in it. I have defined a click-able image by ...
0
votes
2
answers
141
views
mod_python ignoring shebang and using Python 2 instead of 3
I'm trying to run a script in the browser. I installed mod_python for running web-based applications on the server and set a shebang in my script:
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
...
0
votes
1
answer
680
views
migrating from mod_python into mod_wsgi (multiple projects)
After upgrade to jessie my django stops working. I found that problem is in mod_python, so I decided that this is good reason to migrate to mod_wsgi.
I read this but i'm not sure what to do if i got ...
0
votes
2
answers
35
views
Python Syntax Incorrect
I am a novice with Python. I am trying to output a first initial last name for an email address. Such as:
John Doe
[email protected]
I am using the following Python:
primary_mail = '%(givenname)s'[0:...
0
votes
1
answer
686
views
ubuntu 15.04 python module telnetlib
I need some help with my new Ubuntu 15.04 VM. I tryied to install the pip module telnetlib3 but I got some errors:
pip install telnetlib3
Downloading/unpacking telnetlib3
Downloading telnetlib3-0.2....
1
vote
0
answers
87
views
Cherrypy initalization of Monitor object
I have an application that uses cherrypy. It is run with mod_python (which I know is deprecated) at apache2 server.
I want to use Monitor plugin to run periodic task. My problem is that ...
-1
votes
1
answer
386
views
how can I run this code as a webpage in python-apache-ubuntu server?
This code snippet works in a normal python interpreter, just a simple binary search. What do I need to add/change to this code to run it as a webpage ?
def binarySearch(s,array):
first=0;
last=len(...
0
votes
1
answer
1k
views
how to configure apache2 mod_python
I am trying to configure apache with mod_python to run python scripts . I have tried many different configuration but none worked . my hello.py file seems like this
from mod_python import apache
...
0
votes
1
answer
1k
views
Ajax load issues with space in url
I have 2 python files: gui.py & index.py
python.py contains table with records from mysql database.
gui.py contains python.py and textfield with button to send messages.
Also, gui.py contains ...
2
votes
1
answer
3k
views
how to add python path in mod_python
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 ...
1
vote
0
answers
493
views
Mod Python not working
I have installed mod_python-3.3.1-16.el6.x86_64 using epel repository in Centos 6.5 for Ganglia Python Modules.
When I start gmond service, I am getting the following error:
Starting GANGLIA gmond:...
1
vote
0
answers
97
views
How to use non utf-8 input in mod_python python version 2
I have tried to encode user input using .decode("utf-8") . This works if I try "—".decode("utf-8") in a python terminal, and returns u'\u2014 . However, when I use title=str(data.getfirst("title"))....
-1
votes
1
answer
95
views
Running django with mod_python on a shared apache server
I'm in a university and I'm provided with a public_html folder where I can put my CGI scripts. For eg. when I put PHP scripts and visit them from my browser, it works correctly and the PHP is properly ...
0
votes
1
answer
103
views
How can you message a background process from mod_python?
We're running a Linux server running Apache2 with mod_python. One mod_python script inserts an entry in a database logging table. The logging table is large can be a point of disk-write contention, ...
2
votes
2
answers
934
views
Why are my mod_python global variables resetting?
I have a server using apache2 with mod_python that seems to reset global variables after some short period of time. Until this happens, all the features of the server and global variables are handled ...
4
votes
1
answer
3k
views
How to access a query parameter ("$_GET") in mod_python?
I want to know how to show requests ($_GET) on a python script ?
Note that i am using mod_python as basic web server running with apache2 on UBUNTU server.
If you have any idea your help will be ...
2
votes
0
answers
663
views
mod_python 3.5.0 on windows
Did somebody install mod_python 3.5.0 on Windows? Google explains how to install it on *nix, but I need this Apache module on Windows. And I need only this version because it only Python 3+ is ...
0
votes
1
answer
222
views
Why does python not working?
I don't know why python isn't working with apache in ubuntu.
I've got python and libapache2-mod-python installed.
My default config file:
Options Indexes FollowSymLinks MultiViews
AlowOverride None
...
1
vote
1
answer
352
views
Is it possible to run mod_python Python Server Pages outside of the Apache server context?
I have experience coding PHP and Python but have until recently not used Python for much web development.
I have started a project using mod_python with Python Server Pages which does a very good job ...
2
votes
1
answer
608
views
How to exit from a python session on channel hangup .?
My scripts keeps on giving me error log
Channel is hungup and application 'curl' does not have the zombie_exec flag
Can anybody tell my how to exit session on channel hangup ?
0
votes
1
answer
253
views
Trac logo and favicon 404
This is going to read similar to the other Trac static resource issues I found (pretty well encompassed by this SO question), but this doesn't appear to be the same issue.
I have partial (non-root) ...
0
votes
0
answers
76
views
Django settings_module becoming unset randomly?
I'm trying to figure out a really weird problem with this django program. Basically we have a django based app thats been split into a second app, mainly by loading the settings_sis.py file instead of ...
3
votes
1
answer
2k
views
Can I run flask on an Apache server with mod_python?
I have a pre-configured Apache server with neither root nor any shell access. I only can push files via ftp.
However, I know that the server supports Python via mod_python. Here is what the config ...
0
votes
1
answer
437
views
Looking for wsgi way of processing forms like mod_python Publisher
In mod_python Publisher, I could write a file loader, (uploader.py in this example) using code like this:
def index():
html = '''
<html>
<body>
<form id="...
1
vote
2
answers
151
views
Can't understand 500: internal error with Django, Apache, Mod_python
I'm getting a 500:Internal error when i try to start my apache server with django.
I tried the steps given in the previous questions Django with Apache 500 Error and Django Apache mod_wsgi 500 but ...