Sessions' URL or Cookies

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Reply

Post by user___ »

That was the problem. We have solved it. You are great Everah. I will check where exactly the problem came from and I will post back.

Thank you, man.

First:
array(2) {
["username"]=>
string(12) "testusername"
["password"]=>
string(12) "testpassword"
}

You user name is testusername

And your password is testpassword

Click here to go back to page 1
Then:
array(2) {
["username"]=>
string(12) "testusername"
["password"]=>
string(12) "testpassword"
}

You user name is already set to testusername

And your password is already set to testpassword

Click here for page 2

Click here to clear the session data
Pre-Finally:
array(2) {
["username"]=>
string(12) "testusername"
["password"]=>
string(12) "testpassword"
}

You user name is already set to testusername

And your password is already set to testpassword


Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\apache\session-test-page1.php:17) in C:\Program Files\Apache Group\apache\session-test-page1.php on line 30

Even though you see the information above, the session has already been terminated. Refresh the page and you will see nothing as the page sets the session vars again.

Click here for page 2

Click here to clear the session data
The warning comes from the setcookie function because of sent headers.

Finally:
array(2) {
["username"]=>
string(12) "testusername"
["password"]=>
string(12) "testpassword"
}

You user name is testusername

And your password is testpassword

Click here to go back to page 1
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Reply

Post by user___ »

I have spotted six differences. The last two are not very involved in what we were discussing as far as I know but I decided to post everything.
Mine:
session.save_path = "C:/PHP/tmp"//Where do you save them or is it necessary?
session.cookie_path = "C:/PHP/tmp"//Where do you save them?
session.bug_compat_42 = 1//I am nt very familiar with this
session.bug_compat_warn = 1//With this too.
session.hash_bits_per_character = 4
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
Yours:
;session.save_path = "/tmp"
session.cookie_path = /
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Quite honestly I am not entirely certain of what those values do. I'd bet there is information on the sessions page of the manual though. I am just glad you got it working.
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Reply

Post by user___ »

Me too, man. I will have a look and may post something in some hours.
BTW:Thank you again.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You got it. Glad I could help.
Post Reply