Okay, this morning and going back 6 months I'm able to use sessions.

Suddenly this afternoon, users can not log in. After messing with the code for awhile, I discover that the session variable that my header checks for is not being passed from the login page to the rest of the site:

My code:

(script1)

session_start();
session_register("secure");
$secure=1;

Is not being picked up on the other "end":

(script2)

session_start();

echo $secure;

//returns nothing....nor does:

while (list($key,$val) = each($HTTP_SESSION_VARS)){

echo "$key=$val</br>\n";

}

There are four administrators who claim they have not touched anf config file period today.

Here's my phpinfo results:

http://bluephantomwriters.com/temp060602/phpinfo.htm

Any insight would be greatly appreciated.

    Hi,

    I have a similar problem. I recently upgraded PHP (to clean up code for the new register_globals change in 4.2) and have PHP4.1.2 and Apache/1.3.24 running on Linux (FreeBSD, RedHat etc) I have various virtual hosts running on the server in question with almost the same login process as you mention.

    These servers have been running for over a year perfectly fine with the same configuration on my previous dev system and on two live servers on older versions of php4 - one has been upgraded to 4.1.2 and has no problems with the identical code.

    However, my upgraded dev system (installed in exactly the same fashion as a previously working server with identical php coded pages) does not seem to pass session variables through when using the virtual hosted sites. Even the test $count example in the manual does not work as it used to and does on my old and upgraded servers.

    The interesting thing here is that the scripts DO work in the primary host on the same system... The moment you move the code to a virtually hosted (name based) site on the server, the sessions do not carry over.

    I am at a loss about what to do next as I have already tried various things (some stupid, some possible) from Apache AllowOverride settings, to --enable-trackvars (suplerflous with 4.1.2) to enabling register_globals in various combinations. I have recompiled PHP and Apache step by step with identical settings to those on the working servers but nothing seems to make the scripts work on the virtual hosts.

    Any help would be appreciated

      17 days later

      I have the same problem.. sessions dessear.

      system: w98, apache 1.3.26, php 4.20.

      Can anyone help ?

        Write a Reply...