John Price wrote:
I'm far from a Python guru, so that's why I'm asking the
developer's list.

I want to integrate the Mailman web pages into the rest
of my web page, but everything else is PHP.  I've seen
lots of posts about using PHP with Mailman, but not really
any solutions (if I missed it, please point me in the
right direction).

With that in mind, I thought I'd try to see how to do it
myself.  All I really need Mailman to do is after it
generates it's HTML to pipe the output through
/usr/bin/php before sending it to stdout where apache will
get it.

I have a solution, but I but there's a better way within
Mailman.

Right now I moved all the programs in
/usr/local/mailman/cgi-bin to
/usr/local/mailman/cgi-bin.orig, then created shell
scripts in cgi-bin that look like this:

--- start file: listinfo ---
#!/bin/sh

../cgi-bin.orig/listinfo | /usr/bin/php
--- end file: listinfo ---

That's all there is to it.  Now I can add PHP directives
in Mailman's HTML code, and they get parsed.

Is there a better way?

That seems pretty reasonable to me, though I've never though about it before. At some point it should be possible in Apache 2 to use PHP as a filter, so that Apache will redirect the output of Mailman to PHP (with a little configuration to that effect, of course). I believe using PHP as a filter is considered experimental now, but hopefully that use will mature. This seems like the best long-term solution -- then your PHP is running in the same environment for Mailman as for your other pages.


--
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org
_______________________________________________
Mailman-Developers mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-developers
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Reply via email to