Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- $_SESSION maximum size
- Hans Ebert
October 13, 2008, 4:47 pm
rate this thread
I'm storing an uploaded jpeg in the session :
$_SESSION['image'] = base64_encode(file_get_contents("..."));
But that data is truncated. How to prevent this ?
Another way would be to copy the file into a temp folder
and delete it when the session is destroyed.
How do I get notified when session is destroyed ?
Re: $_SESSION maximum size
Hans Ebert schreef:
It should be perfectly possible to store the image in your session. It
is weird, but possible.
You must make some mistake when displaying it.
ARe you using base64_decode() when serving the image?
You don't with default session.
You can build your own sessionhandler and gain full control:
Read on here if you want to take that route: