I've tried the suggested code changes and no difference :( I just don't
think sessions are working for me at all.
I said in my original posting that the second page was creating an empty
file in my session.save_path directory as though the second page has no
reference to the first one.
In my
If you want to check for cookie add
echo cookie = .$_COOKIE[session_name()];
to the second page.
To check if transparent sessions are enabled look into phpinfo() output
- session.use_trans_sid
Shaun Campbell wrote:
I've tried the suggested code changes and no difference :( I just don't
think
That's it. Setting use_trans_sid to 1 got sessions working. I'm now getting
PHPSESSID=7398a182a64f0b2603e369812e130727 appended to the end of the
page2.php URL and only one session file in my temp directory.
One final question. In the php.ini file it says that
Use of trans sid may risk your
* Thus wrote Shaun Campbell ([EMAIL PROTECTED]):
That's it. Setting use_trans_sid to 1 got sessions working. I'm now getting
PHPSESSID=7398a182a64f0b2603e369812e130727 appended to the end of the
page2.php URL and only one session file in my temp directory.
One final question. In the php.ini
I've got a problem getting sessions to work and I wondered if anyone could
offer any advice.
The example I am using is to get one page to set variables in a session and
then use another page to retrieve them. I am using 4.3.4RC2 and prior to
that 4.3..3 on Win2k with IE6 and Apache 1.3.22.
The
Shaun Campbell wrote:
I've got a problem getting sessions to work and I wondered if anyone could
offer any advice.
The example I am using is to get one page to set variables in a session and
then use another page to retrieve them. I am using 4.3.4RC2 and prior to
that 4.3..3 on Win2k with IE6 and
The second page should be
?php
session_start();
echo { $_SESSION['foo'] . BR\n);
echo { $_SESSION['bar'] };
?
you're missing the session_start()
You need it on every page that you plan to use session
on.
--- John Nichel [EMAIL PROTECTED] wrote:
Shaun Campbell wrote:
I've
Daniel Guerrier wrote:
The second page should be
?php
session_start();
echo { $_SESSION['foo'] . BR\n);
echo { $_SESSION['bar'] };
?
you're missing the session_start()
You need it on every page that you plan to use session
on.
He has session_start() on page two.
snip
page2.php
Your right :)
I think he's using the brackets instead of parenthesis
in the echo's.
Change the {} to ()
--- John Nichel [EMAIL PROTECTED] wrote:
Daniel Guerrier wrote:
The second page should be
?php
session_start();
echo { $_SESSION['foo'] . BR\n);
echo {
Daniel Guerrier wrote:
Your right :)
I think he's using the brackets instead of parenthesis
in the echo's.
Change the {} to ()
Yep, he is...didn't notice that on the first pass. The code I cut and
pasted from his with have errors
Fixed code
echo ( $_SESSION['foo'] . BR\n );
echo (
John Nichel mailto:[EMAIL PROTECTED]
on Wednesday, October 22, 2003 11:33 AM said:
?php
echo foo = {$_SESSION['foo']}BR;
echo bar = {$_SESSION['bar']};
Get rid of the foo = and the bar =. when you use the single
equals sign, you're setting value
Not when it's inside a string.
Chris W. Parker wrote:
John Nichel mailto:[EMAIL PROTECTED]
on Wednesday, October 22, 2003 11:33 AM said:
?php
echo foo = {$_SESSION['foo']}BR;
echo bar = {$_SESSION['bar']};
Get rid of the foo = and the bar =. when you use the single
equals sign, you're setting value
Not when it's
?php
echo foo = {$_SESSION['foo']}BR;
echo bar = {$_SESSION['bar']};
Not when it's inside a string.
His statements should output the following:
foo = somevalueBR
bar = anothervalue
Also... he's using { and } because you can't access an array's value
unless it's within curly braces.
Not
Chris Boget wrote:
?php
echo foo = {$_SESSION['foo']}BR;
echo bar = {$_SESSION['bar']};
Not when it's inside a string.
His statements should output the following:
foo = somevalueBR
bar = anothervalue
Also... he's using { and } because you can't access an array's value
unless it's within curly
Okay, so we're back to square onewhy his sessions aren't working.
This thread has been snipped too much, and I've already deleted the
original, so I don't have the code that wasn't working.
Sadly, I don't have the original, either. :|
On a side note, Chris, are you in Louisiana?
Yes,
Chris Boget wrote:
Okay, so we're back to square onewhy his sessions aren't working.
This thread has been snipped too much, and I've already deleted the
original, so I don't have the code that wasn't working.
Sadly, I don't have the original, either. :|
I just pulled it from the archives
On Wednesday 22 October 2003 22:08, Shaun Campbell wrote:
I've got a problem getting sessions to work and I wondered if anyone could
offer any advice.
The example I am using is to get one page to set variables in a session and
then use another page to retrieve them. I am using 4.3.4RC2 and
17 matches
Mail list logo