$_SESSION maximum size

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hans Ebert

    $_SESSION maximum size

    Hi,
    I'm storing an uploaded jpeg in the session :
    $_SESSION['image'] = base64_encode(f ile_get_content s("..."));
    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
    Thorsten

  • Erwin Moller

    #2
    Re: $_SESSION maximum size

    Hans Ebert schreef:
    Hi,
    Hi,
    I'm storing an uploaded jpeg in the session :
    $_SESSION['image'] = base64_encode(f ile_get_content s("..."));
    But that data is truncated. How to prevent this ?
    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?

    >
    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 ?
    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:


    Regards,
    Erwin Moller
    >
    Best regards
    Thorsten
    >

    --

    Comment

    • Betikci Boris

      #3
      Re: $_SESSION maximum size

      On Oct 13, 7:47 pm, Hans Ebert <tok...@news.cn ntp.orgwrote:
      Hi,
      I'm storing an uploaded jpeg in the session :
      $_SESSION['image'] = base64_encode(f ile_get_content s("..."));
      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
      Thorsten
      This is not a good approach..

      Comment

      Working...