$_SESSION maximum size

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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 ?

Best regards

Re: $_SESSION maximum size

Hans Ebert schreef:
Quoted text here. Click to load it


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?

Quoted text here. Click to load it

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:

Erwin Moller

Quoted text here. Click to load it


Re: $_SESSION maximum size

Quoted text here. Click to load it

This is not a good approach..

Site Timeline