I'm having some issues with email piping not working.
This is what I have: (I've changed the domain name from my actual domain name to domain.me)
The PHP script. I've modified it heavily for the purpose of the post.
The script is not being invoked by the piping.
This is what I have: (I've changed the domain name from my actual domain name to domain.me)
Code:
/usr/local/bin/php -q /home/xyzca25/domains/DOMAIN.ME/public_html/pipe.php
The PHP script. I've modified it heavily for the purpose of the post.
The script is not being invoked by the piping.
Code:
#!/usr/local/bin/php -q
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// read from stdin
$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd))
{
$email .= fread($fd, 1024);
}
fclose($fd);
$filename = "mail_".date("mdYHis").rand(1,99999999);
file_put_contents("./".$filename, $email);
?>