Hi,
I have a quick question about PHP session. In my website I have included the command
session_start(); at the top of every page. Firstly is this correct? Secondly when I
visit the website the first link I click on has the php session ID appended to the url
however this php session ID
sending any actual content -- if you have, say, a lot of initialization logic, this
could actually be quite a long way into your script.
Secondly when I visit
the website the first link I click on has the php session ID
appended to the url however this php session ID is not
appended
on has the php session ID appended to the url however this php session ID is not appended to subsequent links ! Is this correct behaviour? What is going on? Can anyone explain?
When you first visit the site, session_start() sets a cookie that
contains the session id. However, since this is your
click on has the php
session ID
appended to the url however this php session ID is
not
appended to subsequent links ! Is this correct
behaviour?
Yes. It's simply the nature of cookies that it
takes at least one round trip to the server to work
out if you have them enabled
If I want to store a session id in a database, how would I do it , like
this?
$session_id=SID ; ?
and then if I want to retrieve this session id and get all of the info back
that goes with this session id, I would say
session_start()
and then what?
thanks
--
--
Diana Castillo
Global Reservas,
Diana Castillo wrote:
If I want to store a session id in a database, how would I do it , like
this?
$session_id=SID ; ?
and then if I want to retrieve this session id and get all of the info back
that goes with this session id, I would say
session_start()
and then what?
thanks
You'll find some
snip
If I want to store a session id in a database, how would I do it ,
like
this?
$session_id=SID ; ?
and then if I want to retrieve this session id and get all of the info
back
that goes with this session id, I would say
session_start()
and then what?
thanks
/snip
You could just have php store
--- Diana Castillo [EMAIL PROTECTED] wrote:
If I want to store a session id in a database, how would I do it, like
this?
$session_id=SID ; ?
and then if I want to retrieve this session id and get all of the info
back that goes with this session id, I would say session_start() and
then what?
--- Diana Castillo [EMAIL PROTECTED] wrote:
php does it if the user has not disabled cookies and if you remain
on the same server, but if you are changing servers and the user has
disabled cookies
If by changing servers you mean the user visits a different domain, then
passing the session
Hi,
I'm trying to send my session ID using POST/GET auto-inserted by PHP.
This works like a charm in a .php file. But in a .cgi file, a new
PHPSSID appears in the Address field of my browser every time I follow
the link from the file to itself.
What may be causing this? I have had some big
Hello Børge,
Tuesday, January 13, 2004, 9:54:27 AM, you wrote:
BS I'm trying to send my session ID using POST/GET auto-inserted by PHP.
BS This works like a charm in a .php file. But in a .cgi file, a new
BS PHPSSID appears in the Address field of my browser every time I follow
BS the link from
The function session_start is sending a cookie. This means that you can't
echo anything before. Its the same rules as with setcookie.
Iggy [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
can somebody tell me why I am getting this:
Warning: session_start() [function.session-start]:
session_start();
should be on the first line in the script.
regds,
-Original Message-
From: Iggy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 20:08
To: [EMAIL PROTECTED]
Subject: session id
can somebody tell me why I am getting this:
Warning: session_start()
At 01:39 26.02.2003, php said:
[snip]
this code doesn't ouput a session-id.
is the code right? and if not, any suggestions what's wrong?
i'm new into sessions, so forgive me for stupid questions..
thanx
michiel
?
session_start ();
Header(Content-Type:
this code doesn't ouput a session-id.
is the code right? and if not, any suggestions what's wrong?
i'm new into sessions, so forgive me for stupid questions..
thanx
michiel
?
session_start ();
Header(Content-Type: text/html);
echo session id: . $session_id;
?
--
PHP General Mailing List
this code doesn't ouput a session-id.
is the code right? and if not, any suggestions what's wrong?
i'm new into sessions, so forgive me for stupid questions..
thanx
michiel
?
session_start ();
Header(Content-Type: text/html);
echo session id: . $session_id;
?
Where do you think
on 26/02/03 11:39 AM, php ([EMAIL PROTECTED]) wrote:
?
session_start ();
// OPTION
echo session id: . session_id();
// OR
$sid = session_id();
echo $sid;
?
Justin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
]
Subject: [PHP] no session id
this code doesn't ouput a session-id.
is the code right? and if not, any suggestions what's wrong? i'm new
into sessions, so forgive me for stupid questions.. thanx michiel
?
session_start ();
Header(Content-Type: text/html);
echo session id: . $session_id
Scott Fletcher wrote:
[-^-!-%- [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED].
..
Hello all,
I need some clarification. To my understanding, each visit to php site
creates a UNIQUE Session ID (SID).
Only when you call session_start() - this function checks for
[-^-!-%- [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED].
..
Hello all,
I need some clarification. To my understanding, each visit to php site
creates a UNIQUE Session ID (SID). And, that ID stays constants until the
browser is shutdown, or the session is specifically
Is it possible to have one session ID and access it from two domains?
Here's the situation: I have an online store. I use sessions to track
the shopping cart. When I go to checkout and switch to SSL, it's on
another domain (but still on the same machine). I need to access the
session data
Here's the situation: I have an online store. I use sessions to track
the shopping cart. When I go to checkout and switch to SSL, it's on
another domain (but still on the same machine). I need to access the
session data from the non-SSL domain for checkout. How can I go about
doing this?
On Tue, Aug 13, 2002 at 10:47:13AM +0200, Per wrote:
Does anybody know how to get rid of the session id in the url when using
session_set_save_handler.
Perhaps session.use_trans_sid is the ticket you're looking for...
--Dan
--
PHP classes that make web design easier
# START CODE SNIPPET ... COMMENTS BELOW (and yes I am not a db guru by
anymeans, might be easier ways to do this)
?php
session_start();
$tsid=session_id();
echo $tsig; # debug
$date=date(ymdHi);
$connect=mysql_pconnect('localhost', 'user', 'pass');
mysql_select_db('db',
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 7:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Strange session id problem - code is issuing a new one
randomly
# START CODE SNIPPET ... COMMENTS BELOW (and yes I am not a db guru by
anymeans, might be easier ways to do
Dan Harrington wrote:
I'm having the same problem from time to time as well.
Just straight up out of the blue it gives you a new SESSION id.
As a general rule, the reason that you will find yourself with a new
session ID is that the old session ID was not properly communicated back
to the
Hi
Does anybody know how to get rid of the session id in the url when using
session_set_save_handler. There is a user note in the online manual
saying that you have to set the cookie manual to accomplish this but it
doesn't mention how! I've tested some combinations but I can't get it to
Hi there
I've got the following cenario. I got a general user page with a Login
button next to each user. This button only opens a new browser window by
setting the target in the form tag and submits the username, password,
button value, and a newsess flag to the login page in the new browser
Hi there
I've got the following cenario. I got a general user page with a Login
button next to each user. This button only opens a new browser window by
setting the target in the form tag and submits the username, password,
button value, and a newsess flag to the login page in the new browser
Hi!
I am a kind of newbie in PHP programming, but I have found an interesting
problem and some php guys I know were unable to help me to solve it. So I am
coming here with my question...
I have written a little more advanced counter, which should be included in
other PHP scripts in website.
It
At 18.03.2002 14:54, you wrote:
Even if I did´nt look closely at your code, I would suggest, that
you decrease the amount of data, diferent tables to one table.
You set an cookie, therfor you have the same effect as if you use sesssion
vars.
So it´s easy to set and find the data, via cookie.
in php.ini
session.gc_probability= 1 ; percentual probability that the
; 'garbage collection' process is
started
; on every session initialization
session.gc_maxlifetime= 604800 ; after this number of seconds,
to pass session ID.
Can I set standart (i.e. PHPSESSID ) to use to pass session ID ?
Thanks,
Rosen
--
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
to next page.
I want to use some script whitch use SID to pass session ID.
Can I set standart (i.e. PHPSESSID ) to use to pass session ID ?
Thanks,
Rosen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
34 matches
Mail list logo