HannahI 0 Report post Posted September 10, 2010 Hello,I am using CPanel: 11 Accerated 2. I am trying to pipe email to a php script allowing me to run my site via email. I am getting a PHP related issue right now, but my issues with it have been changing. My error message is: <br /><b>Parse error</b>: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in <b>/home/dbank/piped.php</b> on line <b>3</b><br />My code follows: #!/usr/bin/php -q<?php$fd = fopen("php://stdin","r");$email = "";while (!feof($fd)) {$email .= fread($fd, 1024);}fclose($fd);$lines = explode("\n", $email);$from = "";$subject = "";$headers = "";$message = "";$splittingheaders = true;for ($i=0; $i < count($lines); $i++) {if ($splittingheaders) {// this is a header$headers .= $lines[$i].\n;// look out for special headersif (preg_match("/^Subject: (.*)/", $lines[$i], $matches)) {$subject = $matches[1];}if (preg_match("/^From: (.*)/", $lines[$i], $matches)) {$from = $matches[1];}} else {// not a header, but message$message .= $lines[$i].\n;}if (trim($lines[$i])=="") {// empty line, header section has ended$splittingheaders = false;}}mail("derekbank.bank9@gmail.com","Recieved",$message);?>Thanks! Share this post Link to post Share on other sites
HannahI 0 Report post Posted September 10, 2010 Ignore the extra quotes, they do not exist as to Xisto mustv'e added them. Share this post Link to post Share on other sites
yordan 10 Report post Posted September 10, 2010 Why do you say that it's a cpanel11 issue ? Looks like a php syntax issue. Or are you trying to pipe php to mail piped to cpanel? Share this post Link to post Share on other sites
HannahI 0 Report post Posted September 10, 2010 Yeah, it probabally is a php syntax error- now HOW do I fix it? Share this post Link to post Share on other sites
HannahI 0 Report post Posted September 15, 2010 I found the problem. Aparrantly, the quotes were real and were the issue Mods, please change the title to [solved] Thanks Share this post Link to post Share on other sites