php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #8719 session variable not working
Submitted: 2001-01-15 13:14 UTC Modified: 2001-06-27 00:31 UTC
From: apere at agilitime dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.4 OS: Linux Mandrake 7.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: apere at agilitime dot com
New email:
PHP Version: OS:

 

 [2001-01-15 13:14 UTC] apere at agilitime dot com
I'm trying (and in fact it seems to work fine) to register a connection id to a postgres database :

/***********************************/
// the followig instruction works fine and $cnx_id
// gets a value (it is not null)
$cnx_id = pg_connect ("host= blah blah...");
session_register('cnx_id');
/***********************************/

And when I try "session_is_registered('cnx_id');", I get TRUE (even in another script, which is what I want), but unfortunately, $cnx_id is null in every other script... Does anybody know about this ?

NB : the very same code works fine if for example $cnx_id is a string ($cnx_id = "test";) instead of this database thing.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-15 17:27 UTC] sniper@php.net
It isn't currently possible to register resource variables into session.

This is actually a documentation problem as this isn't mentioned on
any of the session related documentation pages.

--Jani
 [2001-06-27 00:31 UTC] danbeck@php.net
Added to session_register() documentation in latest cvs.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 08:01:29 2024 UTC