ften broken and can't build embedded applications
> properly. Seems their Apache httpd is also inferior as well.
>
> Graham
>
> On 8 Feb 2023, at 5:42 pm, Gnarlodious wrote:
>
> There isn't any worker or event module included with the MacPorts Apache,
> and prefork is com
!
-- Gnarlie
On Wednesday, February 8, 2023 at 7:38:09 AM UTC-7 Gnarlodious wrote:
> Seems like it. I got so tired of this nonsense after years that I also
> have a Raspberry Pi on the LAN that runs mod_wsgi no trouble. It's been a
> good compromise, the Macbook is convenient for coding,
ften broken and can't build embedded applications
> properly. Seems their Apache httpd is also inferior as well.
>
> Graham
>
> On 8 Feb 2023, at 5:42 pm, Gnarlodious wrote:
>
> There isn't any worker or event module included with the MacPorts Apache,
> and prefork is com
retty stupid on their
> part if they are.
>
> Look for LoadModule mpm_prefork_module line and see if alternatives are
> commented out for other MPMs and just change which is used.
>
> Graham
>
> On 8 Feb 2023, at 8:48 am, Gnarlodious wrote:
>
> So I installed the
and build it with
the "worker" MPM to get mod_wsgi to behave like I want.
-- Gnarlie
On Tuesday, February 7, 2023 at 9:39:34 AM UTC-7 Gnarlodious wrote:
>
> Okay, it looks like I installed Macports Apache, since Homebrew has given
> me such trouble in the past. They
ions block you
> running third party Apache module, so your only choice is to use
> mod_wsgi-express instead and you can't manually configure Apache using the
> module it builds.
>
> Using HomeBrew Apache avoids the macOS restrictions on third party Apache
> modules as well.
>
I don’t understand why I can’t install any of those packages. Maybe I
should reinstall this Raspbian OS and start over.
Question: Raspbian Stretch comes with Apache 2.4, Will the new ‘Event’ MPM
maintain a stateful Python like the Worker MPM? Because if so, maybe I don’t
even have to build
Trying to install mod_wsgi on Raspberri Pi Stretch:
python3 -m pip install mod_wsgi
but all I get is error:
src/server/wsgi_python.h:24:20: fatal error: Python.h: No such file or directory
#include
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed
Yeah, this upgrade has helped me accept the fact that my next computer
won't be an Apple.
-- Gnarlie
Graham Dumpleton wrote:
>
>
> The problem is that the Security Integrity Protections (SIP) in MacOS
> prevent you from writing anything to the Apache modules directory (unless
> they have
the build.
Graham
On 16/09/2013, at 11:33 PM, Gnarlodious gnarl...@gmail.com javascript:
wrote:
At the end of the make process I get error:
ld: -stack_size option can only be used when linking a main executable
clang: error: linker command failed with exit code 1 (use -v to see
invocation
At the end of the make process I get error:
ld: -stack_size option can only be used when linking a main executable
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
apxs:Error: Command failed with rc=65536
What's wrong? This is 10.8.5 compiling with Python 3.4.0a2.
I was able to zero in on the cause of the problem, sort of. I inadvertently
fixed the problem by importing my Gnomon module in my *.wsgi script, just
like with the other two Python modules that errored. I am not sure what is
so special about my Gnomon module that causes the error, except that
I also attempted to load the threading module like it did in Py 3.2 but
the error returned.
The webapp says this, maybe you can spot a config problem:
SERVER_SOFTWARE Apache/2.2.22 (Unix) mod_wsgi/3.4 Python/3.3.0 DAV/2
mod_wsgi.application_group Sectrum.dev|/wsgi.wsgi
mod_wsgi.callable_object
While debugging a minor problem I ran into the same error message I
reported previously:
ImportError: No module named _strptime
My devbox setup looks like this:
Apache/2.2.22, mod_wsgi/3.4, Python/3.2.3
However the error does not occur on my server, which is running setup:
Apache/2.2.22,
I think I've figured out why this was happening. If Server.app can't parse
a configuration file when it starts up, it replaces the unreadable file
with a default file while leaving Apache running on its previous config.
When that happens, restarting the web service causes the new default
I get the same thing happening. My webapp takes a while to initialize, but
meanwhile all requests get the error. Upon uploading a new version I run a
curl command to make it start up, which minimizes the chance a user will
get the error. I also notice that browsers are modernizing to be more
UPDATE! Some of these complaints may have been solved by rebooting. Upon
investigating this phenomenon, the OSX 10.8 (Mountain Lion) Server.app does
NOT in fact restart Apache.
It turns out that Server.app is built on top of a subsystem that runs httpd
as root user. As a security precaution,
this
is happening I don't know.
-- Gnarlie
On Wednesday, November 7, 2012 9:27:57 AM UTC-7, Gnarlodious wrote:
No. I disabled the offending modules all of which use sqlite3, but it
means my webapp is running in a degraded mode. I am waiting for someone
else to have this problem and solve
No. I disabled the offending modules all of which use sqlite3, but it means
my webapp is running in a degraded mode. I am waiting for someone else to
have this problem and solve it since I am not so knowledgeable.
I did solve the sqlite3 problem by isolating the connection using:
module, especially one which may be using a
different Python version.
Graham
On 29 October 2012 13:27, Gnarlodious gnarl...@gmail.com javascript:
wrote:
Solved:
I removed processes=1 threads=1 from my config and the threading module
imports normally. You may want to keep that in mind
OK here is the final report. import threading MUST be declared in your
*.wsgi script. If not, you get an error ImportError: No module named
threading from any module importing threading. I don't know why this is
the case because it was determined by trial and error.
Anything else I said about
adding in debug which prints out sys.path in WSGI script file and
then later where import of threading was failing.
Graham
On 29 October 2012 22:50, Gnarlodious gnarl...@gmail.com javascript:
wrote:
OK here is the final report. import threading MUST be declared in your
*.wsgi script
My webapp runs normally as a python script, but cannot import module
threading when run under mod_wsgi. This problem started after I upgraded
to Python 3.2.3 which evidently no longer allows concurrent connections to
my SQLite database. Suddenly my module crashed with error:
ProgrammingError:
configuration directives have you set in the Apache configuration?
Have you use WSGIPythonHome, WSGIPythonPath or python-path options to
WSGIDaemonProcess or otherwise tried to override where mod_wsgi gets
it Python modules from?
Graham
On 29 October 2012 05:09, Gnarlodious gnarl...@gmail.com
Solved:
I removed processes=1 threads=1 from my config and the threading module
imports normally. You may want to keep that in mind for future reference.
The sqlite3 concurrency problem remains, however… but only in mod_wsgi. I
get error:
AttributeError: '_thread._local' object has no
I have a block like this in .htaccess, which makes Python scripts invisible
and if somehow they are requested causes error 403 Forbidden:
FilesMatch \.(py|pyc)$
Order Allow,Deny
Deny from all
AddDefaultCharset UTF-8
DefaultLanguage en-US
/FilesMatch
-- Gnarlie
--
You received this
OSX 10.8 already includes mod_wsgi which is located at
/Applications/Server.app/Contents/ServerRoot/usr/libexec/apache2/mod_wsgi.so
so there is no need to install it again unless you have special webapp
requirements. If you were to undo what you did, it may be that Apache will
work normally.
OK, now I get error:
/usr/share/apr-1/build-1/libtool --silent --mode=compile
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/local/include
-I/usr/include/apache2 -I/usr/include/apr-1
I had to go into
ftp://127.0.0.1//usr/share/apr-1/build-1/libtool
And set the path to the compiler. After that I get this error:
/usr/share/apr-1/build-1/libtool --silent --mode=compile
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-DDARWIN
I had to go into
/usr/share/apr-1/build-1/libtoolftp://127.0.0.1//usr/share/apr-1/build-1/libtool
And set the path to the compiler. After that I get this error:
/usr/share/apr-1/build-1/libtool --silent --mode=compile
Is it possible that if the Makefile script was updated to point to the
Xcode folders at the beginning all this would work as expected? That is
what I am seeing all over, a lot of unixy stuff is now in specialized
applications, probably part of the move toward the ios minimalist operating
I see that in the next greatest OSX Server mod_wsgi is built-in! Woohoo,
good work! The module is located at:
/Applications/Server.app/Contents/ServerRoot/usr/libexec/apache2/mod_wsgi.so
Unfortunately it comes precompiled for the older Python which works well
out of the box except that my
Oops, that was erroneous. Here is what really happens:
apxs -q CC
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc
Is that the cc compiler? How do I use it to build mod_wsgi?
--
You received this message because you are subscribed to the Google Groups
on the system?
If you do, where does it have 'cc' command installed?
On 24 June 2012 11:55, Gnarlodious gnarlodi...@gmail.com wrote:
Oops, that was erroneous. Here is what really happens:
apxs -q CC
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc
Has this problem been resolved yet? I am running an OSX version that comes
with Apache/2.2.22 and would hate to have to downgrade Apache to run
mod_wsgi.
-- Gnarlie
--
You received this message because you are subscribed to the Google Groups
modwsgi group.
To view this discussion on
I updated my Python to 3.2.2 and rebuilt mod_wsgi using the new Python but
it doesn't work. I get error
Symbol not found: __Py_FalseStruct
Am I doing something wrong?
-- Gnarlie
--
You received this message because you are subscribed to the Google Groups
modwsgi group.
To view this
I should add that I installed the Python from the package installer. Should
I have built it custom-like?
-- Gnarlie
--
You received this message because you are subscribed to the Google Groups
modwsgi group.
To view this discussion on the web visit
No I didn't know there is a version 4, I'll keep it in mind for next time.
The only reason I wanted to upgrade is that Py3.1 leaves all sorts of .pyc
files in my workspace, and in Py3.2 they are corralled into a cache folder.
-- Gnarlie
--
You received this message because you are subscribed
Is there a shell command to kill and reload my wsgi app? I have a system to
relaunch whenever a module is updated, but it requires one HTTP call to
reload. I would prefer a SSH command to reload it when I upload my modules.
--
You received this message because you are subscribed to the Google
On my server, I am touching the script from the upload command, it reloads
it on first HTTP call, which works.
But on my dev machine I don't have that luxury, I am reloading the
application from inside the WSGI script using a SIGINT signal. Problem is,
this requires 2 page loads, one to quit
I don't want a class created on each request, I want to get environ
when initializing my application. For example:
if environ['SERVER_ADDR']=='127.0.0.1': # If localhost, add a Dev menu
These values would stay the same throughout my session. Now how can I
get these values in __init__? Is there
So... instead of __call__ I should use __iter__, which must return at
least one yield string.
That clarifies it, I think. I'll experiment with it over the next few
days.
-- Gnarlie
http://Gnarlodious.com
--
You received this message because you are subscribed to the Google Groups
modwsgi
Hello Graham. Can you advise me how to use mod_wsgi? Two questions of
burning importance:
1) How do you do a backtrace? Unable to use cgitb with mod_wsgi so
what is the debugging method?
2) Is there a way to re-initialize an application without restarting
Apache after every script change?
Hello. I have a number of scripts that make up a website. One script
receives all query strings and imports modules accordingly. The
problem is that the application runs and quits losing all data between
runs. This means it is constantly building objects from data, which is
slow and makes for a
HA! It is working!
I wrote a script like this:
class test(object):
def __init__(self):
self.runs=1
def __call__(self, environ, start_response):
self.runs+=1
start_response('200 OK', [ ('Content-type', 'text/plain') ])
OK, so I installed Python 3.2 in the standard place using parameters:
./configure 'MACOSX_DEPLOYMENT_TARGET=10.6' \
--prefix=/usr/local/python-3.2 \
--enable-framework=/usr/local/python-3.2/frameworks \
--enable-universalsdk=/ MACOSX_DEPLOYMENT_TARGET=10.6 \
--with-universal-archs=intel
Just a little more info:
otool -L /usr/libexec/apache2/mod_wsgi.so
/usr/libexec/apache2/mod_wsgi.so:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 125.2.10)
/usr/local/python-3.2/frameworks/Python.framework/Versions/3.2/Python
(compatibility version
Thanks, wsgi is up and running I guess. Now to figure out how to run a
script...
-- Gnarlie
http://Sectrum.com
--
You received this message because you are subscribed to the Google Groups
modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this
Hello. Will the wsgi module compile under Python 3.1.1? This is OSX
10.6.7. I did compile it with the path to Py3 but get this error
loading Apache:
apachectl configtest
httpd: Syntax error on line 117 of /private/etc/apache2/httpd.conf:
Cannot load /usr/libexec/apache2/mod_wsgi.so into server:
Hi, thanks for the help. I am running Apache version 2.2.17
I downloaded this file: mod_wsgi-3.3.tar.gz
otool says:
/usr/libexec/apache2/mod_wsgi.so:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 125.2.10)
OK I get it, some things need to be fixed. Sorry I barely understand
this stuff.
I am going to reinstall Apache for Intel and include the options for
wsgi:
--with-mpm=worker
and since I want daemon mode I need option:
--with-apr=DIR|FILE ??
Please advise on what to do.
I am using whatever
Hi there. I have a PPC Xserve OSX 10.5 all freshly installed. I want
to run Python with WSGI, but have not found any clear instructions how
to install it. Sorry I don't know much about this stuff, only Apache.
If someone can explain more concisely I would appreciate it, and post
the procedure on
Thanks, it is up and running. I guess all the warnings at the start of
the file scared me off.
-- Gnarlie
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
modwsgi group.
To post to this group, send email to
53 matches
Mail list logo