Connecting Tech Pros Worldwide Forums | Help | Site Map

Session file pretty print

zurg
Guest
 
Posts: n/a
#1: Sep 21 '05
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
Guest
 
Posts: n/a
#2: Sep 21 '05

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
zurg
Guest
 
Posts: n/a
#3: Sep 22 '05

re: Session file pretty print


Erwin Moller
<since_humans_read_this_I_am_spammed_too_much@spam yourself.com> 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...

R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a
#4: Sep 23 '05

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/

R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a
#5: Sep 23 '05

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/

Closed Thread