[Mailman-Developers] PHP wrappers?

Harold Paulson haroldp@sierraweb.com
Wed, 14 Mar 2001 10:04:47 -0800


Good suggestions,

>You may want to check for things such as PATH information as it could be
>that when executing the script it can't find python executable. One

$PATH did include the directory where the python bin was stored, and 
actually specifying a full path like:

	`/usr/local/bin/python /home/mailman/bin/list_lists`

still doesn't give me any output.

>possible idea is try executing your command in a fasion like:
>
>	system("myprogram arg1 arg2 2>&1");
>
>This may help by showing any output that gets sent to stderr on stdout.

Even better suggestion!  This gives me:

Traceback (most recent call last):
   File "/usr/local/mailman/bin/list_lists", line 108, in ?
     main()
   File "/usr/local/mailman/bin/list_lists", line 86, in main
     mlist = MailList.MailList(n, lock=0)
   File "../Mailman/MailList.py", line 79, in __init__
   File "../Mailman/MailList.py", line 879, in Load
   File "../Mailman/MailList.py", line 856, in __load
IOError: [Errno 13] Permission denied: 
'/usr/local/mailman/lists/myfirstlist/config.db'

Which makes sense.  The config.db file is 660 root.mailman.  I guess 
that is why all the mailman CGIs run with setgid mailman.  I guess 
that leaves me at an impasse.  I probably shouldn't give the web 
server elevated permissions for my little hacks.

Thanks for your help in any case.

	- H


>Chris Ryan
>chris@greatbridge.com
>
>Harold Paulson wrote:
>>
>>  Hey,
>>
>>  I was trying to wrap several of the Mailman CLI tools (list_lists and
>>  such) in a little PHP so I could easily integrate them into a larger
>>  web site.  Using PHP's System() function and the backtick operator to
>>  exec the Mailman tools never seems to result in any output, but no
>>  errors either.  However, I can drop a script of my own (a little Perl
>>  hack or whatever) in the ~mailman/bin directory with the same
>>  ownership and permissions, and it seems to exec just fine.
>>
>>  Any idea what I'm overlooking?
>>
>>          - H
>>
>>  --
>>
>>  Harold Paulson                  Sierra Web Design
>>  haroldp@sierraweb.com           http://www.sierraweb.com
>>  VOICE: 775.833.9500             FAX:   810.314.1517
>>
>>  _______________________________________________
>>  Mailman-Developers mailing list
>>  Mailman-Developers@python.org
>>  http://mail.python.org/mailman/listinfo/mailman-developers

-- 

Harold Paulson                  Sierra Web Design
haroldp@sierraweb.com           http://www.sierraweb.com
VOICE: 775.833.9500             FAX:   810.314.1517