Hola.
I'm trying to create PHP pages to manage a Mailman list. The pages will use the Mailman command-line programs such as find_member.
When I use find_member from the command line to search for an email address that I know is in the selected Mailman list, I get output like:
If the address is not in the mailing list, there is no output.
However, I find that when I run the command in PHP using exec(), popen() or backticks, there is no output ever. The return code from exec() is 1, which makes me think there is an error.
Running whoami in the PHP page tells me that the web server is running as user apache. The Mailman program find_member is executable by all and operates on a db file that is owned by user apache:mailman. So it would seem that Apache has the necessary permissions to do what I'm asking. I don't know how to test on the command-line as user apache because that user does not have a login.
If I run find_member from the command line as a user who has no permissions to do work on the mailing list's db file, then I get a big string of errors.
I guess the real question is: why don't I get any output at all even if there's an error? How do I capture the error output when I use exec(), backticks, etc.?
Thanks much!