php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20630 IIS does not create session first time
Submitted: 2002-11-25 14:11 UTC Modified: 2003-01-02 18:40 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: aelaron at yahoo dot com Assigned:
Status: No Feedback Package: IIS related
PHP Version: 4.2.3 OS: Win2k Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: aelaron at yahoo dot com
New email:
PHP Version: OS:

 

 [2002-11-25 14:11 UTC] aelaron at yahoo dot com
When I log in with IIS it does not create my session I have to log out and then log back in to have my session start. I installed Apache on Win2k server and it works fine first time around. Any ideas on why this is? All my updates and service paks are up to date on IIS, Internet Explorer, and Win2k

thanks,

Dustin

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-28 22:14 UTC] iliaa@php.net
What sort of a session mechanism are you using, URLs, Cookies or both and what kind of session managment are you using, user, php or something else?
 [2002-11-29 02:01 UTC] aelaron at yahoo dot com
Hey iliaa,

I am using the bleow code, I do believe it would be a user session.


function dbconnect()
{
        include("config.php");


        mysql_connect($dbhost, $dbusername, $dbpassword);
        mysql_select_db("$dbname") or die ("Unable to select database");
}

dbconnect();

if(!isset($op))
    $op = "login";
switch ($op)
{
        case "logout":
        $username = 0;
        session_start();
        session_unregister("username");
        header("Location:login.php?op=logout");
        break;

case "login":

$results = mysql_query("select * from auth where username='$username' and password=password('$password')");

if (mysql_num_rows($results)>0)
          {
                        session_start();
                        session_register("username");
                        header("Location:functions.php?op=chpass");
          }

          else
          header("Location:login.php?op=BadLogin");
          break;
}

Any help you can suggest would be great. Like I said it works fine first time around with apache but not with IIS you have to log out and then log back in to get it to work. I tell you what I will create a user for you so you can see. You can log in at the address below:

http://216.150.211.253/phpfiles/login.php

username guest
password guest1

Thanks

Aelaron
 [2002-12-07 01:25 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

Please use $_SESSION autoglobal to add data to the session rather then register_session() and try this on the latest win32 snapshot.
 [2002-12-07 02:16 UTC] aelaron at yahoo dot com
Hi again,

I am confused on what your suggesting I appreciate your patience. You mentioned to use $_SESSION autoglobal but in what syntex? I am using session_register("username"); do I change it to $_SESSION autoglobal("username");?

Thanks

Dustin
 [2002-12-07 02:19 UTC] iliaa@php.net
$_SESSION['var_name'] = "value";
 [2003-01-02 18:40 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC