Re: $_SESSION problem

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

 



At 5:05 PM -0600 4/10/08, Nathan Nobbe wrote:
On Thu, Apr 10, 2008 at 4:29 PM, tedd <<mailto:tedd.sperling@xxxxxxxxx>tedd.sperling@xxxxxxxxx> wrote:

Hi gang:

I'm stumped and in need of some expert explanation.

I have prepared two demos (showing code) for your enjoyment:

[1] <http://www.webbytedd.com/x/index.php>http://www.webbytedd.com/x/index.php
[2] <http://sperling.com/x/index.php>http://sperling.com/x/index.php

Both of these demos have the exact same code; and are on the same server; with exactly the same php-info -- so, why do they behave differently re sessions?

Note that [1] will retain the session values throughout the entire session, while [2] does not and loses session values.


as a sanity check have you dumped out the contents of the session after writing to it on [2] ?
eg.

<?php
// ....
 $_SESSION['q6'] = ( isset($_SESSION['q6']) ? $_SESSION['q6'] : 0);
    $_SESSION['q7'] = ( isset($_SESSION['q7']) ? $_SESSION['q7'] : 0);

$_SESSION['q8'] = ( isset($_SESSION['q8']) ? $_SESSION['q8'] : 0); $_SESSION['q9'] = ( isset($_SESSION['q9']) ? $_SESSION['q9'] : 0);
var_dump($_SESSION);

?>
you might just dump out the session component of the php config on each site to ensure theyre the same.

-nathan

Isn't that what the code is doing?

I'm dumping the results in a print_r($_SESSION) -- isn't that he same thing?

Cheers,

tedd


--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

[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