Hello all, I struggled half a day and came to conclusion that it can't be done. I threw away my php scripts and rewrote it in perl and it worked right from the start the way I wanted it to work. Still, I want to find out if such trivial task can be done correctly in PHP. The question: I have arbitrarily long (in size and time) file upload (via raw data POST) and I simply need to save it to a file with PHP. The way it works with PHP is that it fist fully processes the posted data, saves it to a file and then execution of my script begins (my file upload lasts 30 minutes). Even if I tried to fopen("php:/stdin" or php://input) it still worked that retarded way. What I really need is to be able to process incoming posted data in chunks sequentially. I tried: 1) modphp, 2) php-cgi, 3) php-cli run as a cgi executable. Even though php-cgi is meant to be used a cgi, it still preprocesses posted data (so that $_POST becomes available) and doesn't work just the same way as regular momphp. CLI version run as a cgi script doens't work, as it can't read from php://stdin or php://input at all! Whatever I tried, nothing worked for me and I came to conclusion that it can't be done with PHP... or it can?
thanks