Re: session in php 4.2.3

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

 



Hi!

Jeffrey N Dyke schrieb:
> are you stating the session on on the other pages with session_start()?
 >
Yes I do! Code comes along!
"anmelden.php" does a successful db-login (db-logfile confirms that).
"content.php" runs into:

Warning: OCISessionBegin: ORA-01017: invalid username/password; logon 
denied in /usr/local/httpd/htdocs/funktionen.php on line 6


register_globals is turned on in my php.ini!

thanks
Daniel
<?
  session_start();
  session_set_cookie_params(0);
  require_once("funktionen.php");
  $text="&nbsp;";

  if (isset($HTTP_POST_VARS["submit"]))
     {

        session_register("user","password","db");
        $user = $HTTP_POST_VARS["form_user"];
        $password = $HTTP_POST_VARS["form_password"];
        $db = $HTTP_POST_VARS["form_db"];
        if (@OCILogon($user,$password,$db) != false)
            {
                $sessid = session_id();
                $conn0 = OCILogon($user, $password, $db);
                $query0 = "begin kanban_owner.php_init_benutzer('$user','$sessid'); end;";
                $cursor0 = OCIParse($conn0, $query0) or die ("Fehler beim Parsen");

                // Commit, hier werden die "Jobs" ausgef&uuml;hrt.
                OCIExecute($cursor0) or die ("Fehler beim Ausf&uuml;hren");
                OCIFreeStatement($cursor0);
                del_graphs();
                header("Location: index.php");
                exit;
            }
        $text="<font color=red><b>Username/Password falsch!</b></font>";
     }
  else
  if ($abmelden == 1)
  {   //echo "Abmelden!" ;
      $sessid = session_id();
      if (OCILogon($user,$password,$db) != false)
      {
      $conn = OCILogon($user, $password, $db);
      $query1 = "begin sys.php_unregister_session('$user','$sessid'); end;";
      $cursor1 = OCIParse($conn, $query1) or die ("Fehler beim Parsen");
      OCIExecute($cursor1);
    //  OCIFreeStatement($cursor1);
    }
      session_destroy();
      $abmelden = 0;
      header("Location: anmelden.php");

  }

?>
<html>
<head>
<title>Anmelde Formular</title>
</head>
<body text=#ffffff>
<form method="post" action="<? echo $PHP_SELF ?>">
<table width=100% height=80%>
<tr><td align=center valign=middle>
    <table bgcolor=#1C2B74 border=0 cellspacing="0" cellpadding=0>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
       <tr border=1 align=center>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td><? print($text); ?></td>
           <td>&nbsp;</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>

        <tr>
            <td>&nbsp;</td>
            <td><b>Benutzername:</td>
            <td>&nbsp;</td>
            <td><input type="text" size=20 name="form_user" value=""></td>
            <td>&nbsp;</td>
        </tr>

        <tr>
            <td width=10>&nbsp;</td>
            <td><b>Passwort:</td>
            <td width=30>&nbsp;</td>
            <td><input type="password" size=20 name="form_password" value=""></td>
            <td width=50>&nbsp;</td>
        </tr>

        <tr>
            <td>&nbsp;</td>
            <td><b>Host/DB-Name:</td>
            <td>&nbsp;</td>
            <td><input type=text size=20 name="form_db" value=""></td>
            <td>&nbsp;</td>
        </tr>
        <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align=right><input type=submit name="submit" value="Anmelden"></td>
            <td>&nbsp;</td>
        </tr>
        <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
        <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>

    </table>
    </td></tr></table>
    </form>
</body>
</html>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux