php://stdin limits?

This is a discussion on php://stdin limits? within the PHP Language forums, part of the PHP Programming Forums category; Hello, I've made a script that parses emails with attachments. I tested the code using input from a file ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-09-2005
David Bruno
 
Posts: n/a
Default php://stdin limits?

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


Reply With Quote
  #2 (permalink)  
Old 01-10-2005
EDWARD CHARKOW
 
Posts: n/a
Default Re: php://stdin limits?

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" <webmaster@lowestdomains.info> wrote in message
news:crs2pb$e2v$1@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
>
>



Reply With Quote
  #3 (permalink)  
Old 01-11-2005
Chung Leong
 
Posts: n/a
Default Re: php://stdin limits?

"David Bruno" <webmaster@lowestdomains.info> wrote in message
news:crs2pb$e2v$1@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.


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:46 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0