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




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!

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
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ührt.
OCIExecute($cursor0) or die ("Fehler beim Ausführen");
OCIFreeStatement($cursor0);
del_graphs();
header("Location: index.php");
exit;
}
$text="Username/Password falsch!";
 }
  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");

  }

?>


Anmelde Formular







 
 
 
 
 

   
    
    
    
   
    


 
 
 
 
 



 
Benutzername:
 

 



 
Passwort:
 

 



 
Host/DB-Name:
 

 


 

 
 
 

 


 

 








-- 
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 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 
  
cc:  
  
  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




[PHP-DB] session in php 4.2.3

2002-11-12 Thread dn
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