Re: Disabling the built-in POST handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stefanos Stamatis wrote:
Hello,

I need to handle very large file uploads and push the data into a socket.
Having php to write everything to a temporary file, then reading it
again inside the script and pushing it into the socket is very inefficient
and imposes size limitations to the uploaded files (which may reach GB
in size).

It would be much more efficient if i could disable PHP's built-in handler
of POST form data and handle the incoming data directly from the script
by reading php://input .
(I am aware that i will need to do multi-part MIME processing inside the
script, if I read directly the raw POST data sent by the browser)

Is there a way to completely disable the built-in POST form data handling
of PHP and handle the data inside the script by reading php://input ?

Thanks in advance,

Stefanos Stamatis.


no, because the upload transaction is handled by Apache/IIS. Once the file is completely uploaded, only then does php get the file handed to it.

if on *nix, you could write your own daemon that listens on an alternate port and have your form post its uploads to that given port instead. Then PHP would handle the entire process.



--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux