Re: [PHP-DB] session in php 4.2.3

2002-11-12 Thread Jeffrey_N_Dyke

are you stating the session on on the other pages with session_start()?
what errors are you getting?  if you check for session_is_registered
(user) on the other pages, what do you get?

can you send some code along, its hard to see what the issue may be without
it.




   
  
dn 
  
dn75@planet-in   To: [EMAIL PROTECTED] 
  
terkom.decc:  
  
  Subject: [PHP-DB] session in php 4.2.3   
  
11/12/2002 
  
07:54 AM   
  
   
  
   
  




Hi!

I have to support a PHP-Database-solution which someone else
has developed. In addition I'm quite new to php ...

It uses Oracle 8 to display values out of the database.
Everything is running fine with php 4.1.1.
Due to security reasons I wanted to update to php 4.2.3.
I use the same values within both configure-runs:

./configure \
 --with-oci8=/oracle/product/8.1.7 \
 --with-apxs=/usr/sbin/apxs \
 --enable-sigchild \
 --with-zlib-dir=shared \
 --with-gd=/usr/ \
 --with-png-dir=/usr/lib \
 --without-mysql

The php-scripts do the following when a user logs in:

   session_register(user,password,db);

I assume that other scripts can use this values when they
query the database. A session-file is created in /tmp/.
As I mentioned above everything runs fine with php 4.1.1.

With php 4.2.3 the login-script is ok! When another script
is called it seems like it is not able to read the sess-file
which exists (!) in /tmp/sess

Could you please give me a hint what I'm doing wrong!

Thanks in advance!

Daniel


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





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




Re: [PHP-DB] session in php 4.2.3

2002-11-12 Thread dn
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 ausgefuuml;hrt.
OCIExecute($cursor0) or die (Fehler beim Ausfuuml;hren);
OCIFreeStatement($cursor0);
del_graphs();
header(Location: index.php);
exit;
}
$text=font color=redbUsername/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
titleAnmelde Formular/title
/head
body text=#ff
form method=post action=? echo $PHP_SELF ?
table width=100% height=80%
trtd align=center valign=middle
table bgcolor=#1C2B74 border=0 cellspacing=0 cellpadding=0
tr
tdnbsp;/td
tdnbsp;/td
tdnbsp;/td
tdnbsp;/td
tdnbsp;/td
/tr
   tr border=1 align=center
   tdnbsp;/td
   tdnbsp;/td
   tdnbsp;/td
   td? print($text); ?/td
   tdnbsp;/td
/tr
tr
tdnbsp;/td
tdnbsp;/td
tdnbsp;/td
tdnbsp;/td
tdnbsp;/td
/tr

tr
tdnbsp;/td
tdbBenutzername:/td
tdnbsp;/td
tdinput type=text size=20 name=form_user value=/td
tdnbsp;/td
/tr

tr
td width=10nbsp;/td
tdbPasswort:/td
td width=30nbsp;/td
tdinput type=password size=20 name=form_password value=/td
td width=50nbsp;/td
/tr

tr
tdnbsp;/td
tdbHost/DB-Name:/td
tdnbsp;/td
tdinput type=text size=20 name=form_db value=/td
tdnbsp;/td
/tr

trtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/tr
tr
tdnbsp;/td
tdnbsp;/td
tdnbsp;/td
td align=rightinput type=submit name=submit value=Anmelden/td
tdnbsp;/td
/tr

trtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/tr

trtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/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


Re: [PHP-DB] session in php 4.2.3

2002-11-12 Thread Leif K-Brooks
My guess is a register_globals problem, but it's hard to tell without 
seeing your scripts.

dn wrote:

Hi!

I have to support a PHP-Database-solution which someone else
has developed. In addition I'm quite new to php ...

It uses Oracle 8 to display values out of the database.
Everything is running fine with php 4.1.1.
Due to security reasons I wanted to update to php 4.2.3.
I use the same values within both configure-runs:

./configure \
--with-oci8=/oracle/product/8.1.7 \
--with-apxs=/usr/sbin/apxs \
--enable-sigchild \
--with-zlib-dir=shared \
--with-gd=/usr/ \
--with-png-dir=/usr/lib \
--without-mysql

The php-scripts do the following when a user logs in:

   session_register(user,password,db);

I assume that other scripts can use this values when they
query the database. A session-file is created in /tmp/.
As I mentioned above everything runs fine with php 4.1.1.

With php 4.2.3 the login-script is ok! When another script
is called it seems like it is not able to read the sess-file
which exists (!) in /tmp/sess

Could you please give me a hint what I'm doing wrong!

Thanks in advance!

Daniel




--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.




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




Re: [PHP-DB] session in php 4.2.3

2002-11-12 Thread dn
Hi!

Leif K-Brooks schrieb:

My guess is a register_globals problem, but it's hard to tell without 
seeing your scripts.


That did the trick! Thank you very much!
I did not provide a path to php.ini so
the setting was first not read!
Now it works!

Best regards
Daniel



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