Sessions and HTTP_File_Upload
| From: | Darío Borreguero | Date: | Fri, 06 Mar 2009 13:49:05 +0000 |
| Subject: | Sessions and HTTP_File_Upload | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-29736@lists.php.net to get a copy of this message | ||
Hi,
I'm working with sessions (HTTP_Session2) to control several variables in
private area of my Web application. Some Web pages, belonging to that
private area, allow to upload files, I've noticed that whenever a user tries
to upload a file that exceeds the maximum size an uncontrolled error is
prompted.
This is because the first thing I check is if the session is valid and
aftewards I try to get the uploaded file and do some stuff. But as I
mentioned before, if that file exceeds the maximum size no session checking
is possible, it raises the error: session headers already sent!!
That's why I wonder if it's necessary to check the file size and catch the
error, before to know the session is valid (that's sound weird, isn't it?).
It should be quite normal to do it the other way around, am I wrong?
Any help would be appreciated!! Thanks,
--
Dario.
------[email: dario.borreguero@gmail.com]------------