Re: How to display ALL session variables?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/18/07, Ronald Wiplinger <ronald@xxxxxxxxx> wrote:
>
> truncatei@xxxxxxxxx wrote:
> >
> >
> > 2007/10/18, Nathan Nobbe <quickshiftin@xxxxxxxxx
> > <mailto:quickshiftin@xxxxxxxxx>>:
> >
> >     On 10/18/07, Ronald Wiplinger <ronald@xxxxxxxxx
> >     <mailto:ronald@xxxxxxxxx>> wrote:
> >     >
> >     > Is there a simple way to display all session variables? Like the
> >     code
> >     > below I use in debug for all posted variables:
> >     >
> >
> >     echo '<pre>';
> >     var_dump($_SESSION);
> >     echo '</pre>';
> >
> >     -nathan
> >
> >
> > or use print_r($_SESSION);
> >
> >
>
> I tried:
> <?php
> echo '<pre>';
> var_dump($_SESSION);
> echo '</pre>';
> echo '<p>above as var_dump(D_SESSION) - below as print_r(D_SESSION)';
> print_r($_SESSION);
>
> ...
>
> However, I only see:
>
> above as var_dump(D_SESSION) - below as print_r(D_SESSION)
>
> What is the obviously part I am missing?
>

unless you have session_auto_start set to 1 in php.ini
make sure to call session_start() at the top of your script you want to view
the session from.

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux