Set the session lifetime to 0
2012.05.05. 11:15, "Vinay Kannan" ezt írta:
> Hi Guys,
>
> Any idea as to how we can destroy a PHP session on window close and not
> only when the user clicks on logout link? There is a chance that the same
> application can be used by different users with different
While not sure it's perfectly handled, have done similar things in past, and
right at tope of page, I just check if the relevant session variable is set,
if so, then might check that the value is relevant, or else use
header("Location: index.php"); followed by exit(); to reroute them back to
login
uot; <[EMAIL PROTECTED]>
To: "'Richard Duval'" <[EMAIL PROTECTED]>;
Sent: Monday, March 07, 2005 7:29 PM
Subject: RE: [PHP-WIN] Session Variables
> You need to make sure that in your second page that you're starting the
> session - if you don't do this t
Only use $_SESSION if you're running PHP 4.1.0 or higher as in previous
versions it's not available as a global variable. Check this link on PHP
for more info on session:
http://ca3.php.net/manual/en/ref.session.php
Cheers.
Armando
graeme wrote:
Also use $_SESSION rather than HTTP_SESSION_VAR.
M
Also use $_SESSION rather than HTTP_SESSION_VAR.
Mike wrote:
You need to make sure that in your second page that you're starting the
session - if you don't do this then that second page will never have access
to those session variables.
-M
-Original Message-
From: Richard Duval [mailto
You need to make sure that in your second page that you're starting the
session - if you don't do this then that second page will never have access
to those session variables.
-M
> -Original Message-
> From: Richard Duval [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 07, 2005 7:05 PM
When I was opened my index.php I saw a warning as following:
Warning: open(/tmp\sess_d8371d1d2885a00f831dca4730aa2354, O_RDWR)
failed: m (2) in c:/program files/abria
merlin/apache/htdocs/md/misc/misc3.php on line 12
I use sessions. Related file (misc3.php) and screen view are added to
th
It's only that idiot (quickcop) at QUICK.COM again - use to pop up once
every half year or so
-Original Message-
From: Charles P. Killmer
To: [EMAIL PROTECTED]
Sent: 17-5-2004 16:47
Subject: FW: [QRfsoto]: RE: [PHP-WIN] Session troubles
I know this isnt the place, but this bug
] Session troubles
Add Your E-Mail Address
<http://q4.quik.com/img/spacer.gif>
Thank you for your e-mail. In an effort to address the growing spam issue and to
therefore respond to your e-mail sooner, your e-mail message with the subject of "RE:
[PHP-WIN] Session troubles"
on_start();
>$row['id']=545;
>
>$_SESSION['individual_id'] = $row['id'];
>header("location:dataFilterExpander.php?".sid);
>
>Charles Killmer
>
>-Original Message-
>From: Cory D. Wiles [mailto:[EMAIL PROTECTED]
>Sent: Monday
t;.sid);
Charles Killmer
-Original Message-
From: Cory D. Wiles [mailto:[EMAIL PROTECTED]
Sent: Monday, May 17, 2004 9:40 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Session troubles
Though i can not verify this at the moment. I had a similar problem, but
not with
Though i can not verify this at the moment. I had a similar problem, but
not with sessions and the notice steams from not having a var declared.
To get rid of the error you have to turn e_notice off.
Something like this:
error_reporting = E_ALL & ~E_NOTICE
Here is a good explanation of what was
Sarath [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 04 de marzo de 2004 0:50
Para: [EMAIL PROTECTED]
Asunto: Re: [PHP-WIN] session problems
Hi Dear,
First of all let me warn u that sessions in PHP need to be handled very
carefully. It is very sensitive. Now to your problemIf t
Hi Dear,
First of all let me warn u that sessions in PHP need to be handled very carefully. It
is very sensitive. Now to your problemIf there is an error with session.save_path
u need to configure the php.ini file. If u are using a remote server to run ur php
files then the path of session
t
echo date('Y m d H:i:s', $_SESSION['time']);
// You may want to use SID here, like we did in page1.php
echo '
page 1';
?>
-----Original Message-
From: Sudeep Sarath [mailto:[EMAIL PROTECTED]
Sent: Friday, February 27, 2004 12:08 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-W
ciated.
-Original Message-
From: Sudeep Sarath [mailto:[EMAIL PROTECTED]
Sent: Friday, February 27, 2004 12:08 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Session not working
Hello Yi Socheat,
I think i am right in variable declaration. On both the pages i used
$_SESSION['value'
Hello Yi Socheat,
I think i am right in variable declaration. On both the pages i used
$_SESSION['value'] instead of $_session["value"]. Still it gives the blank page..
...SuDeEp..
Yi Socheat <[EMAIL PROTECTED]> wrote:
You write the wrong name because PHP function name or variable is
Sudeep Sarath,Hello!
PHP is sensitive to capital letters or lowercases.
Please try to use $_SESSION['value']
=== 2004-02-27 15:40:14 ===
>Hello everyone,
>
>I recently installed Apache 1.3.9 server and php 4.3.4(from win32 zip package) on my
>system with Windows98SE as o/s. I c
}
if (isset($_SESSION["idAsset"])) {
$idAsset = $_SESSION["idAsset"];
}
Thanks,
John Ellingsworth
http://mail.med.upenn.edu/~jellings/
AIM: vc2000support
-Original Message-
From: Jennifer S. [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 10, 2004 5:36 AM
To:
Hi,
Seems to work OK. I consistently got the same session ID
I am in a similar situation, moving all my ASP apps to PHP. I run Apache 2.0 on Win
2000 servers. I have actually traced the sessions in the PHP session data directory
and found things to be working consistently and well.
Are you using
You can't rely on the cleint, anything can happend with the client.
Maybe calling session_destrouy() from the web server script is what you
actually want to do.
-Original Message-
From: Meteorlet
To: php-windows
Sent: 1/6/2004 3:27 PM
Subject: [PHP-WIN] Session Problem
Hi,everyon
David,
I too had the same problem, once I put the session_start(); outside the HTML
tag it's now gone away, but, using this code which is in a tutorial,
I get these errors:
Start Code ++
http://www.w3.org/TR/html4/loose.dtd";>
Session test
I can't believe it was just that. Thanks a lot, man.
Cheers,
Voodoo
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The error just means you are printing something out before you call
session_start();
you just need to call session_start() *before* you print anything out to the
page, so it's best off called at the top/start of your php page.
-Original Message-
From: Voodoo [mailto:[EMAIL PROTECTED]
Sent
I've done that. Still not working.
-Original Message-
From: Mike Brum [mailto:[EMAIL PROTECTED]
Sent: den 5 oktober 2003 19:25
To: 'Disko_kex'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Session Problem
Assuming this is tied into your other problem (which I read first), t
Assuming this is tied into your other problem (which I read first), then the
problem here is that it appears you're on a Windows machine and you don't
have php.ini set up correctly.
You need to set the session.save_path in php.ini to point to a directory
that exists. Mine, for example is this:
se
Still not working?
-Original Message-
From: Mike Brum [mailto:[EMAIL PROTECTED]
Sent: den 5 oktober 2003 19:12
To: 'Disko_kex'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Session prob
You need to start the session.
sesstion_start();
Read up - http://us3.php.net
You need to start the session.
sesstion_start();
Read up - http://us3.php.net/manual/en/function.session-start.php
-Original Message-
From: Disko_kex [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 05, 2003 12:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Session prob
Why isn´t
>Disko_kex wrote:
>> but I get this warnings and its not working at all. What should I do?
>>
>> Warning: session_start():
>> open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea, O_RDWR) failed: No
such
>> file or directory (2) in c:\inetpub\wwwroot\session.php on line 7
>>
>> Warning: session_start
Disko_kex wrote:
but I get this warnings and its not working at all. What should I do?
Warning: session_start():
open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea, O_RDWR) failed: No such
file or directory (2) in c:\inetpub\wwwroot\session.php on line 7
Warning: session_start(): Cannot send sessio
stical Web Designs
http://www.mystical-sector.com
<-- I design and i redesign but still i never designed true beauty like you
-->
From: "Disko_kex" <[EMAIL PROTECTED]>
To: "'Dean Hayes'" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
Subject: RE: [PHP-
uot; <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
Subject: RE: [PHP-WIN] Session Vars
Date: Mon, 25 Aug 2003 12:33:50 +0200
Try this instead:
Session_start();
$_SESSION["id"] = $PHPSESSID;
$_SESSION["user_name"] = $form_username;
$_SESSION["
Try this instead:
Session_start();
$_SESSION["id"] = $PHPSESSID;
$_SESSION["user_name"] = $form_username;
$_SESSION["user_pass"] = $form_pass;
print "$_SESSION[id], $_SESSION[user_name], $_SESSION[user_pass]";
// jocke
-Original Message-
From: Dean Hayes [mailt
PROTECTED]
Subject: Re: [PHP-WIN] Session problems
Creative Solutions New Media wrote:
> I'm getting the following errors string to start a session.
>
> Warning: session_start() [function.session-start]:
> open(/tmp\sess_801eb94975c2de92f1085a8d4521af12, O_RDWR) failed: No such
> file
Creative Solutions New Media wrote:
I'm getting the following errors string to start a session.
Warning: session_start() [function.session-start]:
open(/tmp\sess_801eb94975c2de92f1085a8d4521af12, O_RDWR) failed: No such
file or directory (2) in G:\Program Files\Apache
Group\Apache2\htdocs\Imptech\
> how can i track that a particular session is still active or not.
> so how can i get it.
Ever heard "I think therefore I am!" ? ;)
bool connection_aborted();
bool connnection_timeout();
0/1/2 connection_status();
0 = normal, 1 = aborted, 2 = timeout
--
PHP
If you could interpret them, and the problem would be to get rid of them,
that's one thing.
This is different.
Be more specific.
What warnings ?
- Original Message -
From: "tana dsasa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 23, 2003 11:17 AM
Subject: [PHP-WIN] s
In PHP.ini file (somewhere in the %windows% directory), there is a
directory referenced as:
session.save_path = c:/winnt/temp
Check 2 things:
a) that the directory in that entry is set to an existing directory of
which the process running the web server has read/write permissions
b) when issue
hi hector,
i've this problem too. my setup is winxp, ms iis 5.1, php 4.3.1.
may i know have you manage to solve this problem? if yes, how to solve it?
thanks and regards,
raymond
===
"Hector Lumang" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PR
PHP will use the session id that your browser specifies. If you have
php setup to store session id in cookies, every time you refresh the
page your browser is telling php what session id to use. Then when you
close your browser, your cookies may be getting deleted.
Charles Killmer
-Original
First, I'd check the session.save_path specified in the php.ini file and
make sure that directory exists. By default, /tmp does not exist on
windows, so I would change that to c:\inetpub\sessions and create the
directory, although you can use any directory you wish.
That seems to be the most comm
in the php.ini make sure the global register=on. PHP 4+ this is set to off
by default.
From: "Jed R. Brubaker" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Session Variables
Date: Wed, 4 Dec 2002 00:15:19 -0700
I am having a problem with a simple script that uses session var
Raheel,
Have you done a session_start() on each page that requires session
variables? Or set the php.ini Session Auto Start to 1 (true, if I recall
correctly) if you want sessions enabled on all your page calls, then
restart your http server.
-Dash
Heaven, n.:
A place where the wicked ce
Where's the session_start()?
You need it on every page that is gonna use session vars I think..
Rich
-Original Message-
From: Antonello Oliveri [mailto:[EMAIL PROTECTED]]
Sent: 24 September 2002 18:27
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] session under windows
I've istalled PHP ver. 4
y, July 10, 2002 11:34 AM
To: 'Dash McElroy'; 'PHP Windows'
Subject: RE: [PHP-WIN] SESSION vars
Well once the session var has been set using the previously posted
methos I can accress like $_SESSION['foo']. Should I be able to simply
do this:
Session_s
---
e: [EMAIL PROTECTED]
p: 603.943.4237
w: http://www.criticalcode.com
PO BOX 601
Manchester, NH 03105
-Original Message-
From: Dash McElroy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 2:15 PM
To: 'Matt Babineau'
Subject: RE: [PHP-WIN] SESSION vars
Have you started
://www.criticalcode.com
PO BOX 601
Manchester, NH 03105
-Original Message-
From: Robert Trembath [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 2:12 PM
To: Matt Babineau
Subject: Re: [PHP-WIN] SESSION vars
On Wed, 2002-07-10 at 12:56, Matt Babineau wrote:
> I was reading on php.net but it s
Turn on register_globals in your php.ini file.
On Tue, 14 May 2002, Donny Hariady wrote:
> This is my first experience with PHP session manager. I try the following code:
>
> session_start();
> print($counter);
> $counter++;
> session_register("counter");
>
> I found that PHP writes a sess_somet
try this;
-
session_start();
session_register("counter");
print($counter[num]);
$counter[num]++;
-
-Original Message-
From: Donny Hariady [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 20
I'm a bit confused by your description. Seeing the code itself would be
much more of a help. One thing that I notice though is that you say you
session_register 'myvar' on the first page. But the value for myvar isn't
actually set until after the form has been submitted, right? What might
That does the trick, I must have changed this (long) before as it was
looking for a directory that no longer exists!
Thanks.
-Original Message-
From: Piotr Pluciennik [mailto:[EMAIL PROTECTED]]
Sent: 28 March 2002 08:15
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Session errors
Hi
Hi,
PHP cannot save session information to your disk. As
described in error message you probably haven't
defined correct path to session directory (it's
different on linux and windows)... or not set rights
to it. So check php.ini "session.save_path" and
properties of that directory.
For exampl
create a directory called c:\temp and replace \tmp to c:\\temp in your
php.ini file on the windows server.
- Original Message -
From: "Martin.Andrew" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 11:07 AM
Subject: [PHP-WIN] Session errors
> Quick Questi
At 03:58 PM 3/18/2002 +0100, Martin wrote:
>Hmm I have registred the Session $Namn
>by the following snippet:
>
><< File1 >>
>session_register("Namn");
>$Namn = "sweden";
>echo"ett litet test med sessioner";
>?>
Should there be a session_start() here? You have session.auto_start set to
0 in you
AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] session probs
[Tue Mar 05 15:42:00 2002] [error] [client 127.0.0.1] Premature end of
script headers: c:/php/php.exe
this is the error from error.log
now after reinstalling apache has php.exe an error ...
"Richard Black" <[EMAIL PROTECT
[Tue Mar 05 15:42:00 2002] [error] [client 127.0.0.1] Premature end of
script headers: c:/php/php.exe
this is the error from error.log
now after reinstalling apache has php.exe an error ...
"Richard Black" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
>
> What error do you get??
What error do you get??
Can you copy us the error message, and maybe a snipplet of code???
Richy
==
Richard Black
Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com
Tel: 0141 435 3504
Email: [EMAIL PROTECTED]
-Original Message-
What version of IE are you using? Is this problem
occurs with different versions or only with 4?
Piotr
--- Brian Feliciano <[EMAIL PROTECTED]> wrote:
> how can i avoid this message in IE
> -
> Warning: Page has Expired
> The page you requested was created using information
> you submitted
>From: [EMAIL PROTECTED]
>
>I am using Sessions on a website. When a user hits the back button they
get
>an error message "Page has Expired". Is there a way preventing this. I
can
>currently using 4.0.6 if that helps at all.
Yes, there is naive approach to this: remove every single web page wi
At 08:38 AM 12/20/2001 -0500, [EMAIL PROTECTED] wrote:
>I am using Sessions on a website. When a user hits the back button they get
>an error message "Page has Expired". Is there a way preventing this. I can
>currently using 4.0.6 if that helps at all.
You asked this exact same question two da
At 05:02 PM 12/18/2001 -0500, [EMAIL PROTECTED] wrote:
>I was wondering how I can stop the following message from posting when a
>user hits the back button when I am using sessions?
Look for this section in your php.ini:
; Set to {nocache,private,public} to determine HTTP caching aspects.
sessio
Make sure the tmp directory is created and it has write permissions to
everybody.
bye.
_
Dario Fernando Escobar Risueño
Webmaster Telesat S.A.
[EMAIL PROTECTED]
Cali - Valle - Colombia
- Original Message -
From: "Afan Pasalic" <[EMAIL PROTECTED]>
To: <[E
ED]>
Sent: Friday, December 07, 2001 1:08 PM
Subject: Re: [PHP-WIN] session problem
> Your tmp directory may not exist. Change the setting for session.save_path
> in the php.ini file - I used c:\windows\temp and it worked for me. I was
> getting the same error message.
> - Original
Hello Afan,
I'm also using Sessions, but I learned that when using session_register you
don't use the normal variable syntax with the session variable, such as
($name). Here's my code that works properly:
As you can see I use session_register('variablename'), then declare the
session variable
There are two potential problems (unless, of course, there's more to your
pages than what you're showing us). Do you put a session_start() at the
top of each page? If not, you won't be able to share variables across
pages. Also, are you sure the session id is getting passed to each
page? I
Angie,
Check you php.ini file. If the following line is set, then you get the
behavior you are talking if two conditions exist.
session.use_trans_sid = 1
1. Cookies are off or couldn't be set for some reason.
2. You have started a session of somekind somewhere.
-Flint
-Original Message---
Jason,
In order to work with session vars, do like this:
This all has to be done before sending output to the browser, just as is the
case with cookies.
Hope this helped :)
/Christian
-Original Message-
From: Jason Belletty [mailto:[EMAIL PROTECTED]]
Sent: 26. juni 2001 17:13
To: [E
rtfm
Hi, Jason
Have a look at:
http://www.php.net/manual/en/ref.session.php ("Session handling
functions" from PHP manual)
And some articles:
http://www.phpbuilder.com/columns/ying2602.php3
http://www.phpbuilder.com/columns/mattias2312.php3
http://www.phpbuilder.com/columns/mattias2
As far as I'm aware you can't. The nature of sessions dictates that this
isn't possible.
Sessions are global to all active instances of a browser.
However, if you're running Netscape and IE at the same time, they won't
share the same session.
> -Original Message-
> From: Shadow Tree [ma
My mistake. I should have looked into this a little bit more before I
posted a message about it. It turns out that my HTML was the problem, not
the PHP session variables. When I was writing out the text controls I was
writing the tag as value=variable instead of value="variable", which was
Hi,
Ok, first of all, the function session_start () should be run on each page
that uses session variables. It is necessary to access, create or modify
session variables.
To register variables, use session_register (). Be aware that the function
uses a string argument. So to regi
D DAILY!
Licking County, Ohio, USA
740-349-3631
Aliquando et insanire iucundum est
> -Original Message-
> From: Asendorf, John [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 09, 2001 1:37 PM
> To: Mark Collins; Php-Windows (E-mail)
> Subject: RE: [PHP-WIN] Session problems
&
Dear Mark,
You must have the line
session_start ();
at the beginning of the pages that are part of the session. This is the
function which gets the session id. You can also use session_start to BEGIN
the session. You must then register any variables you want to be held by
the session. You
lications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Aut insanit homo, aut versus facit
>
>
> > -Original Message-
> > From: Johannes Janson [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 0
- NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Aut insanit homo, aut versus facit
>
>
> > -Original Message-
> > From: Johannes Janson [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 04, 2001 2:29 PM
> > To: [EMAIL PROTECT
to:[EMAIL PROTECTED]]
> Sent: Wednesday, April 04, 2001 2:29 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] session, session RGH
>
>
> good point. never think you were NOT stupid
> if something doesn't work cause usually you are.
> But unfortunately in this case
SA
> 740-349-3631
> Aut insanit homo, aut versus facit
>
>
> > -Original Message-
> > From: Johannes Janson [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 04, 2001 2:02 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] session
FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Aut insanit homo, aut versus facit
> -Original Message-
> From: Johannes Janson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 04, 2001 2:02 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] session,
.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Aut insanit homo, aut versus facit
>
>
> > -Original Message-
> > From: Asendorf, John [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 04, 2001 1:49 PM
> &g
-
> From: Asendorf, John [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 04, 2001 1:49 PM
> To: Johannes Janson; Php-Windows (E-mail)
> Subject: RE: [PHP-WIN] session, session RGH
>
>
> Try this little rework...
>
>
>
>
>
>
> session_start(
Try this little rework...
Counter initialized, please reload this page to see it
increment";
} else {
echo "Waking up session $PHPSESSID";
$count++;
session_register("count");
}
echo "The counter is now $count ";
?>
-
John Asendorf - [EMAIL PROTECTED
Hi,
as you can see from the error message apache looks for
a dir called /tmp. This is a unix path. You have to change this to a
windows path such as c:\temp or what you like.
Johannes
""[Inf] F!RE-WALL"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
99sd6d$m6k$[EMAIL PROTECTED]">news:99sd6d$m6k$[E
Never mind! I've found the reason for this erratic behaviour: It's inside
Windows 2000. Obviously Windows itself is deleting the content of its
TEMP-Directory from time to time... So my session files are not deleted by
the PHP garbage collection routine but from this %*&/ Windows.
Since the sessi
83 matches
Mail list logo