Session file pretty print

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

    Session file pretty print

    Does anybody know of a tool/script which would format php
    session files to a more readable form ??

    This would be for debugging, now if you have lots of
    stuff in a session, it's a pain to try to find anything
    from the file.
  • Erwin Moller

    #2
    Re: Session file pretty print

    zurg wrote:
    [color=blue]
    > Does anybody know of a tool/script which would format php
    > session files to a more readable form ??
    >
    > This would be for debugging, now if you have lots of
    > stuff in a session, it's a pain to try to find anything
    > from the file.[/color]

    Hi,

    SOmething like this could help:
    1) Open the file
    2) unserialize it into some variable ($mySes)
    3)
    <pre>
    <? var_dump($mySes ); ?>
    </pre>

    That gives a better formatted overview.


    Regards,
    Erwin Moller

    Comment

    • zurg

      #3
      Re: Session file pretty print

      Erwin Moller
      <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> wrote in
      news:433153ed$0 $11062$e4fe514c @news.xs4all.nl :
      [color=blue]
      >
      > Hi,
      >
      > SOmething like this could help:
      > 1) Open the file
      > 2) unserialize it into some variable ($mySes)
      > 3)
      ><pre>
      ><? var_dump($mySes ); ?>
      ></pre>
      >
      > That gives a better formatted overview.
      >
      >
      > Regards,
      > Erwin Moller
      >[/color]

      This is not so simple, session data is not quite the same as serialize
      data (there is an extra field for variable name).

      And if session contains class objects, they should be defined
      before unserializing.. .

      Comment

      • R. Rajesh Jeba Anbiah

        #4
        Re: Session file pretty print

        zurg wrote:[color=blue]
        > Does anybody know of a tool/script which would format php
        > session files to a more readable form ??
        >
        > This would be for debugging, now if you have lots of
        > stuff in a session, it's a pain to try to find anything
        > from the file.[/color]

        <news:note-23908@php.net> (
        http://groups.google.com/group/php.n...9db3c79756e979 )

        --
        <?php echo 'Just another PHP saint'; ?>
        Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

        Comment

        • R. Rajesh Jeba Anbiah

          #5
          Re: Session file pretty print

          R. Rajesh Jeba Anbiah wrote:[color=blue]
          > zurg wrote:[color=green]
          > > Does anybody know of a tool/script which would format php
          > > session files to a more readable form ??[/color][/color]
          <snip>
          [color=blue]
          > <news:note-23908@php.net> (
          > http://groups.google.com/group/php.n...9db3c79756e979 )[/color]

          Also, check the user notes at <http://in2.php.net/session_decode>

          --
          <?php echo 'Just another PHP saint'; ?>
          Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

          Comment

          Working...