By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,959 Members | 1,139 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,959 IT Pros & Developers. It's quick & easy.

php://stdin limits?

P: n/a
Hello,
I've made a script that parses emails with attachments.
I tested the code using input from a file and everything was parsed
correctly.
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
output.
Is there a size limit for emails being piped to a script? Even with an
attachment
of 3k, it doesn't work. Can it not handle multi part MIME emails?

thanks,
David
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
David,

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.

Ed
http://www.stmadeveloper.com
"David Bruno" <we*******@lowestdomains.info> wrote in message
news:cr**********@daisy.noc.ucla.edu...
Hello,
I've made a script that parses emails with attachments.
I tested the code using input from a file and everything was parsed
correctly.
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
output.
Is there a size limit for emails being piped to a script? Even with an
attachment
of 3k, it doesn't work. Can it not handle multi part MIME emails?

thanks,
David

Jul 17 '05 #2

P: n/a
"David Bruno" <we*******@lowestdomains.info> wrote in message
news:cr**********@daisy.noc.ucla.edu...
Hello,
I've made a script that parses emails with attachments.
I tested the code using input from a file and everything was parsed
correctly.
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
output.
Is there a size limit for emails being piped to a script? Even with an
attachment
of 3k, it doesn't work. Can it not handle multi part MIME emails?

thanks,
David


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.
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.