Re: [PHP] session register()

2006-03-11 Thread Satyam


- Original Message - 
From: "suresh kumar" <[EMAIL PROTECTED]>

To: "php" 
Sent: Saturday, March 11, 2006 4:51 PM
Subject: [PHP] session register()



i am facing two problems in my project.

 1) whether i can store variable as session variable inside javascript 
function




You can echo code such as:

echo 'var sessionVariable ="' , $SESSION['thisVariable'],'"';



 2)Is there any function available to calculate idle time of user .

Not that I know of and probably there won't be anyway since that is knowing 
things about the user that is not your business to know.


Satyam



  i am waiting for reply from u


-
Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time. 


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



[PHP] session register()

2006-03-11 Thread suresh kumar
i am facing two problems in my project.
   
  1) whether i can store variable as session variable inside javascript function
   
  2)Is there any function available to calculate idle time of user .
   
   i am waiting for reply from u


-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

RE: [PHP] Re: PHP Session register variable not always restored with contents

2002-10-26 Thread Victor Soroka
On Thu, 24 Oct 2002 21:26:30 +, John W. Holmes wrote:

> What is supposed to be in the session? Maybe these users are just
> denying cookies?
Maybe... But my php compiled with --use-trans-sid and use this feature.
In the session i store account, access timestamp etc...

P.S. And 10% of traffic ~2000 visitors.


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




RE: [PHP] Re: PHP Session register variable not always restored with contents

2002-10-24 Thread John W. Holmes
What is supposed to be in the session? Maybe these users are just
denying cookies?

---John Holmes...

> -Original Message-
> From: Victor Soroka [mailto:vs240@;yahoo.com]
> Sent: Thursday, October 24, 2002 10:08 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: PHP Session register variable not always restored
with
> contents
> 
> I have same troubles!!! I use php internet trade traffic system, and
> 10-20% of visitors lose their sessions data. Cut from logs:
> 
> Remote address: ##
> Referer: http://mydomain.com/
> URI: /out.php?id=1&PHPSESSID=235a91cef853e750a6b67a70375e7d88
> User-agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
> Session ID: 616596c44d83c581a829658b63191d7c
> Session DATA:
> 
> Remote address: ##
> Referer: http://mydomain.com/music.php?0
> URI: /out.php?id=1&link=freemusic
> User-agent: Mozilla/5.0 (Windows; U; Win98; de-DE; QXW0330l)
> Gecko/20011019 Netscape6/6.2
> Session ID: b7a5708d134a08c370fb5778e099d0d0
> Session DATA:
> 
> Session DATA is EMPTY ! In 10-20% of visitors. I think
> this is a PHP bug, because most of visitors don't lose their session
data.
> I used my script on 10 different servers (BSD,Linux) and PHP 4.0.6 -
PHP
> 4.2.1.
> 
> On Mon, 30 Sep 2002 17:34:27 +0300, Brad Hanson wrote:
> 
> > many times the value is presented. Sometimes it is a null string.
> > Sometimes it takes a few refreshes before it will display anything
other
> > than blank.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




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




[PHP] Re: PHP Session register variable not always restored with contents

2002-10-24 Thread Victor Soroka
I have same troubles!!! I use php internet trade traffic system, and
10-20% of visitors lose their sessions data. Cut from logs:

Remote address: ##
Referer: http://mydomain.com/
URI: /out.php?id=1&PHPSESSID=235a91cef853e750a6b67a70375e7d88
User-agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Session ID: 616596c44d83c581a829658b63191d7c
Session DATA: 

Remote address: ##
Referer: http://mydomain.com/music.php?0
URI: /out.php?id=1&link=freemusic
User-agent: Mozilla/5.0 (Windows; U; Win98; de-DE; QXW0330l) Gecko/20011019 
Netscape6/6.2
Session ID: b7a5708d134a08c370fb5778e099d0d0
Session DATA: 

Session DATA is EMPTY ! In 10-20% of visitors. I think
this is a PHP bug, because most of visitors don't lose their session data.
I used my script on 10 different servers (BSD,Linux) and PHP 4.0.6 - PHP 4.2.1.

On Mon, 30 Sep 2002 17:34:27 +0300, Brad Hanson wrote:

> many times the value is presented. Sometimes it is a null string.
> Sometimes it takes a few refreshes before it will display anything other
> than blank.

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




RE: [PHP] PHP Session register variable not always restored with contents

2002-09-30 Thread John W. Holmes

> I have been trying to save a variable using PHP sessions.
> 
> What I find is that while most of the time the variable content is
> restored
> and available on the subsequent pages, however there are times that
the
> variable seems to be there but the contents are not.  If I hit the
browser
> refresh a couple of times, it will then work.
> What am I doing wrong??
> 
> Here is the code fragment where the variable is set and kept in
session:
> 
> at the beginning:
>  // routine to allow login to the system and authenticate that login
> session_start();
> 
> :
>   $adminkey = $row["keychain"];
>   print("Keychain: $adminkey");
>   session_register(adminkey);

should be session_register("adminkey");

Is register globals on or off?

---John Holmes...



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




[PHP] PHP Session register variable not always restored with contents

2002-09-30 Thread Brad Hanson

I have been trying to save a variable using PHP sessions.

What I find is that while most of the time the variable content is restored
and available on the subsequent pages, however there are times that the
variable seems to be there but the contents are not.  If I hit the browser
refresh a couple of times, it will then work.
What am I doing wrong??

Here is the code fragment where the variable is set and kept in session:

at the beginning:
");
  session_register(adminkey);

==
then in the page that needs to get the $admin key contents:

http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] session register!!

2002-02-08 Thread Janet Valade

Did you use session_start() on the second page?

In other words, the first page should have

session_start();
session_register("the_var");
$the_var=-"here it is";
link or whatever takes you to the second page.

Then the second page needs

session_start();
echo "$the_var";

Janet

- Original Message - 
From: "Cristian Cerda" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 08, 2002 11:15 AM
Subject: [PHP] session register!!


> Hi there, hope you can help me with my problem.
> 
> I'm trying to set up a PHP/MySQL web site using session variables to
> pass information between pages. So far no good.
> 
> I did set register_globals to On on the php.ini file. But when i use for
> example session_register("the_var") in one page ( using session_start()
> at the beginning), i don't get anything on the next page if i do echo
> $the_var .
> 
> Don't know what's wrong, but my guess is i have something wrong with the
> configuration as i copy/pasted most of the code.
> 
> I'm using OS X / WebSTAR V / PHP 4.0.6 as a CGI / MySQL
> 
> please help
> 
> Cristian
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


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




Re: [PHP] session register!!

2002-02-08 Thread Cristian Cerda

yes, and didn't work.

Erik Price wrote:

> On Friday, February 8, 2002, at 02:15  PM, Cristian Cerda wrote:
>
> > I did set register_globals to On on the php.ini file. But when i use for
> > example session_register("the_var") in one page ( using session_start()
> > at the beginning), i don't get anything on the next page if i do echo
> > $the_var .
>
> I could be wrong about this: did you try restarting Apache?  e.g.,
> "apachectl graceful" ?
>
> Erik
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]


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




Re: [PHP] session register!!

2002-02-08 Thread Erik Price


On Friday, February 8, 2002, at 02:15  PM, Cristian Cerda wrote:

> I did set register_globals to On on the php.ini file. But when i use for
> example session_register("the_var") in one page ( using session_start()
> at the beginning), i don't get anything on the next page if i do echo
> $the_var .

I could be wrong about this: did you try restarting Apache?  e.g., 
"apachectl graceful" ?


Erik




Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] session register!!

2002-02-08 Thread Cristian Cerda

yes i did.

Nick Wilson wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> * and then Cristian Cerda declared
> > Hi there, hope you can help me with my problem.
> >
> > I'm trying to set up a PHP/MySQL web site using session variables to
> > pass information between pages. So far no good.
> >
> > I did set register_globals to On on the php.ini file. But when i use for
> > example session_register("the_var") in one page ( using session_start()
> > at the beginning), i don't get anything on the next page if i do echo
> > $the_var .
>
> Did you set your $the_var?
>
> Like:
>
> session_start();
> session_register('the_var');
>
> $the_var="is this the problem?";
>
> - --
>
> Nick Wilson
>
> Tel:+45 3325 0688
> Fax:+45 3325 0677
> Web:www.explodingnet.com
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8ZCj4HpvrrTa6L5oRAoQJAJ91jzJYx0KV9Su+8/aJuoIURDNEYACeINDf
> StxfV0PhCeYfeGNWM17XFOM=
> =1Rrm
> -END PGP SIGNATURE-

--
Cristián Cerda Pé
[EMAIL PROTECTED]

Impulsando Ltda.
www.impulsando.com
San Pio X 2460  of.604
Providencia - Santiago
Tel: (56 2) 3358978



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




Re: [PHP] session register!!

2002-02-08 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Cristian Cerda declared
> Hi there, hope you can help me with my problem.
> 
> I'm trying to set up a PHP/MySQL web site using session variables to
> pass information between pages. So far no good.
> 
> I did set register_globals to On on the php.ini file. But when i use for
> example session_register("the_var") in one page ( using session_start()
> at the beginning), i don't get anything on the next page if i do echo
> $the_var .

Did you set your $the_var?

Like:

session_start();
session_register('the_var');

$the_var="is this the problem?";

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8ZCj4HpvrrTa6L5oRAoQJAJ91jzJYx0KV9Su+8/aJuoIURDNEYACeINDf
StxfV0PhCeYfeGNWM17XFOM=
=1Rrm
-END PGP SIGNATURE-

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




[PHP] session register!!

2002-02-08 Thread Cristian Cerda

Hi there, hope you can help me with my problem.

I'm trying to set up a PHP/MySQL web site using session variables to
pass information between pages. So far no good.

I did set register_globals to On on the php.ini file. But when i use for
example session_register("the_var") in one page ( using session_start()
at the beginning), i don't get anything on the next page if i do echo
$the_var .

Don't know what's wrong, but my guess is i have something wrong with the
configuration as i copy/pasted most of the code.

I'm using OS X / WebSTAR V / PHP 4.0.6 as a CGI / MySQL

please help

Cristian



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




[PHP] Session Register Problem

2001-07-24 Thread Curts

This code was working 4 weeks ago, i swear.

When i attempt a login, it goes through this script all the way to the
Header once a successful login as happened.  Everything in this code
block works correctly, except that the variables don't exist in the
session.  It's almost as if the "session_register()" function doesn't
work anymore.  Can anyone see what i'm doing wrong:




'; 
else print 'Registration of $dvd_login Failure';

if (session_register('dvd_access_level')) print 'Registered
$dvd_access_level'; 
else print 'Registration of $dvd_access_level Failure';

if (session_register('dvd_first_name')) print 'Registered
$dvd_first_name'; 
else print 'Registration of $dvd_first_name Failure';

if (session_register('dvd_last_name')) print 'Registered
$dvd_last_name'; 
else print 'Registration of $dvd_last_name Failure';

if (session_register('dvd_email')) print 'Registered 
$dvd_email';
else print 'Registration of $dvd_email Failure';

if (session_register('dvd_id')) print 'Registered 
$dvd_id'; 
else print 'Registration of $dvd_id Failure';

print "$dvd_login, $dvd_access_level, $dvd_first_name,
$dvd_last_name, $dvd_email, $dvd_id ";
print " $query";

if (isset($redirect))
print 'Header("Location: " . 
base64_decode($redirect));';
else
print 'Header("Location: /loggedIn.php");';

die;
} else 
$loginError = "Unable to authenticate.Please try again.";
  
}
}
?>

To test the session i use this script:  (nothing is showing up though).

';
print 'Session';
while (list($key,$val) = each($HTTP_SESSION_VARS)) {
print "$key$val\n";
}
print '';

?>

-- 
robin curts
senior programmer
[EMAIL PROTECTED]
/**/
thoughtbubble productions, inc.
http://www.thoughtbubble.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]