473,387 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
Jul 17 '05 #1
2 2642
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Chuck Anderson | last post by:
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?). I...
6
by: Phil Powell | last post by:
In TCL it would be written this way: I guess what I need is the PHP equivalent of TCL's gets command (see http://www.astro.princeton.edu/~rhl/Tcl-Tk_docs/tcl8.0a1/gets.n.html for more...
2
by: comp.lang.php | last post by:
function &getResponse() { /*---------------------------------------------------------------------------------------------- New 7/29/2005: Windows can use STDIN, however, the 'con' input data...
1
by: | last post by:
I want to run PHP scripts from my C++ program. I can run "php -n my_script.php" but I have 2 problems: 1. From my C++ program I want to pass to PHP script a data structure (a C++ map). I think...
2
by: Stelios G. Sfakianakis | last post by:
Hello, I am using php 4.2.2 in Red Hat 9.0 with apache 2.0.40 I try to build a php script that accepts POST requests that contain multimedia data and shoves them in a MySQL database. My problem is...
17
by: comp.lang.tcl | last post by:
The TCL command I am using will do a command-line action on a PHP script: set cannotRunPHP I have to do it this way as both the TCL script and the PHP script run as CLI. However, "info.php"...
3
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work...
0
by: todddeluca | last post by:
I am posting code for calling almost any python function from php, because it seems generally useful. Please feel free to suggest improvements or tell me this has already been done better...
2
by: BDthatsme | last post by:
I can't get any of the various examples of keyboard input to work using command line PHP. I have Windows XP Pro SP 2 and PHP 5.1.6 (cli) (built: Aug 23 2006 16:35:53). I can't find any info...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.