php://stdin limits?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
 I've made a script that parses emails with attachments.
I tested the code using input from a file and everything was parsed
However when I used "php://stdin" and piped emails to the script,
it seems to just quit half way thru. There are no errors....but also no
Is there a size limit for emails being piped to a script? Even with an
of 3k, it doesn't work.  Can it not handle multi part MIME emails?


Re: php://stdin limits?


I have been working with these alot lately.  I kept finding that I forgot to
chmod the script I was sending it to correctly.  Check your chmod.

Near as I can tell there isn't a limit, I am sending about 500,000
characters and stripping sections out, and posting to a database, and
creating a new page........and sending a few dozen of these e-mails back to
back with no problems.

If you display your code I will try and come take a peek.

Quoted text here. Click to load it

Re: php://stdin limits?

Quoted text here. Click to load it

Sounds like a pipe deadlock to me. That happens when a child process has
filled up the output buffer and starts to wait for the parent process to
move some data off the buffer. But the parent process is waiting for the
child process to clear up some space in the input buffer so it can push in
more data. So the whole thing stalls.

Two way pipes are tricky to implement. I don't think PHP gives you the
necessary means to do it.

Site Timeline