Jump to content

forethought

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

forethought's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Just had a moment of clarity, I don't think PHP calls whatever you have defined for "sendmail_path" in your php.ini file with arguments, I think it calls that program and then dumps the email data out on STDIN, which is why $* is blank. I changed the wrapper script to: #!/bin/sh logger -p mail.info vhostmail: site=${HTTP_HOST}, client=${REMOTE_ADDR}, script=${SCRIPT_NAME} /usr/sbin/sendmail -t -i With the same result, so now I'm still just trying to find out how to pass the Apache environment variable to my shell script, that's all.
  2. I know that, what I was saying was I found it weird that there are no arguments being passed to the script, not that the variables are not defined. I know they're not defined in the shell, they are environment variables specific to Apache, but this code was presented by one of the previous posters, and I'm unable to have it work the way it's intended to, and I'm trying to figure out why, mainly, how to pass these Apache specific environment variables to the shell script. But I've tested this by trying to write "$#" (for the number of arguments passed to the wrapper), "$*" (for all arguments passed to the wrapper), and even "${1}" (what should be the first argument passed to the wrapper), and as I previously indicated, "$#" is "0" (no arguments passed), "$*" is "" (blank), as is "${1}".
  3. It's weird, because it doesn't seem to pass any arguments to the script. If I do this: logger -p mail.info vhostmail: site=${HTTP_HOST}, client=${REMOTE_ADDR}, script=${SCRIPT_NAME}, arguments=$# I get in my maillog file: logger: vhostmail: site=, client=, script=, arguments=0 And if I try to output everything: logger -p mail.info vhostmail: site=${HTTP_HOST}, client=${REMOTE_ADDR}, script=${SCRIPT_NAME}, arguments=$* I get: logger: vhostmail: site=, client=, script=, arguments= I've officially got no clue... :-\
  4. I'm having the same problems as the original poster, and I followed steviewdr's advice, but my maillog file shows this entry whenever PHP sends email: logger: vhostmail: site=, client=, script= Is there something I'm missing in regards to the environment variables?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.