Email Piping Problems

doni49

Well-Known Member
Oct 4, 2006
74
0
156
I'm trying to set up piping email to a PHP script. When I went to bed last night, it was working FINE. Tonight, when I send myself a test message, I get mail delivery bounce back messages. The following is at the bottom of the error message (right before it shows the message and headers that it was trying to process).

I was getting the same message last night, but I kept trying different things and eventually the errors stopped. Once it started working, I copied the script files to a safe location. When I saw that the error was back again, I copied the files from the safe location back to the server again. The error won't go away. Regardless of the bounce message, the script DOES process.

I've made sure the script and the folder it's in has permissions set to 755.

I've also noticed that if I send a message from an address that's not in my domain, the bounce message does NOT seem to be sent. I sent several from my work address and several from a free webmail account that I have.

This is making me coo-koo!:confused:

PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version of Zend Optimizer in Unknown on line 0
X-Powered-By: PHP/5.1.6
Content-type: text/html
 

doni49

Well-Known Member
Oct 4, 2006
74
0
156
UPDATE: This has gotten even STRANGER!

Before going to bed last night, I continued to try and figure this out. I kept trying different things and sending test messages. I got this bounce back message NO MATTER WHAT I DID.

This morning, I sent another test message before I changed ANYTHING. I did NOT receive a bounce back.

What would cause it to go from NOT working to working without my making changes?
 

doni49

Well-Known Member
Oct 4, 2006
74
0
156
I stand corrected. The bounce back DID come in this AM.

I just didn't see it.
 

doni49

Well-Known Member
Oct 4, 2006
74
0
156
Did you upgrade Zend?
No I didn't.

1) I'm a shared hosting user.

2) Why would trying to run a php script (of ANY type--piped or otherwise) tell me that error message?

I'm still TOTALLY befuddled why it was working with NO ERROR MESSAGES when I went to bed Thursday night but when I got home Friday night, the error messages hd returned.
 

doni49

Well-Known Member
Oct 4, 2006
74
0
156
Another update

After my last reply, I sent my host a link to this thread.

I just received an email telling me that it's been updated & asking to try again. I'll do that as soon as I get home.
 

doni49

Well-Known Member
Oct 4, 2006
74
0
156
Well I got home and tested it. The zend optimizer error is gone. But I'm still getting bounce backs. :confused:

When I go to a shell and type which php, it tells me /usr/local/bin/php. I've tried putting that full path in the pipe call and in the shebang line both. I've tried /usr/bin/php as well (this folder also has a php file).

This is what gets bounced back.
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |/usr/local/bin/php /home/username/EmailHandlers/EmailHandler.php 1 0
generated by [email protected]

The following text was generated during the delivery attempt:

------ pipe to |/usr/local/bin/php /home/username/EmailHandlers/EmailHandler.php 1 0
generated by [email protected] ------

#!/usr/bin/php -q

------ This is a copy of the message, including all the headers. ------
From here down, it just shows the message's headers and body.
The message DOES get process correctly--but these bounce backs get thrown. And they still SEEM to only get thrown if the sender is one of my own domains. PUZZLING!
 

doni49

Well-Known Member
Oct 4, 2006
74
0
156
UPDATE: Seems to be fixed.

Still no clue why it was throwing bounce backs.

But since my host fixed the zend issue, I decided to start over and went back to the basics and little by little added everything that I need my script to do.

It's now doing everything without throwing bounce backs. I just hope it stays that way (remember that when I went to bed on Thursday night, it was working too).