LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Piping mail to php...

[ILUG] Piping mail to php...

adam beecher adam at iewebs.com
Fri Apr 14 16:11:43 IST 2000


> Just quessing.. did you try the alias with the RHS surrounded by quotes?
>
> test1234: "| /usr/local/php/scripts/mail-redirect.php"
>

Nah, I had the pipe up next to the path anyway, and majordomo works ok the
other way too, so it wasn't that. Thanks anyway Donncha.

I figured it out anyway, thanks to Thomas Bridge and Liam Bedford. Yes
Thomas, I am running the bog standard RedHat sendmail (shame on me) and yes
Liam I guess that does mean I'm using smrsh in sendmail. Is that a Bad
Thing? It also demonstrates that I still haven't got the hang of
permissions - the mail-redirect.php script had 755 permissions, but I had to
755 php too to get it working. Surely because mail-redirect was owned by
root php should have let it work?

Anyway, it's working now, but I'm not getting the data from STDIN. And I'm
not very good with STDIN, so can anyone help me out here too please? The
problem is obviously with this bit:

$fp = fopen("/dev/stdin", "r");
while (!(feof($fp)))
	$buffer = fgets($fp, 4096);
	$content .= $buffer;
}

Why ain't PHP pulling the data from STDIN?

Thanks all,
adam





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell