php sessions

This is a discussion on "php sessions" within the PHP Forum section. This forum, and the thread "php sessions are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Nov 3rd, 2005, 15:21
New Member
Join Date: Nov 2005
Age: 19
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
php sessions

well, i've been working on an small tutorial site (don't mind the mess)
and here's my problem:

login as admin with the password 123456

nothings wrong right?
now wait till the index page comes back up, and see who's welcomed.

the same thing happens when you login as "test" with the password "5312"
---
it alway's changes the session variable "user" to thomask...
i tried fixing it by turning on register_globals in the .htacces file,
but all editing .htacces files give me are internal server errors...

now, anybody know an way to fix this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 4th, 2005, 04:14
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Re: php sessions

Need to see some code, but i'm going to guess some where along the way your username is being reset.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Nov 4th, 2005, 07:53
New Member
Join Date: Nov 2005
Age: 19
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: php sessions

don't mind the mess in the code
quickly puffed it together.

--
for asfar as i searched, it's not beeing changed anywhere..
-> forgot the database :s
exported it in 2 different compatebillities.
Attached Files
File Type: zip tutsite.zip (6.5 KB, 40 views)
File Type: zip MYSQL40.sql.zip (577 Bytes, 35 views)
File Type: zip MYSQL323.sql.zip (579 Bytes, 27 views)

Last edited by fragalot; Nov 4th, 2005 at 10:35.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Nov 4th, 2005, 22:00
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Re: php sessions

To test if its being reset change the $_SESSION['user'] to something else like $_SESSION['name'] that way if user is being used some where else it will solve the problem if it still is getting changed you know the problem is some where else.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Nov 5th, 2005, 06:49
New Member
Join Date: Nov 2005
Age: 19
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: php sessions

i'm re-doing the whole site now, because it's coded poorly, and cluttered
thx for the help tho.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Nov 7th, 2005, 20:21
Tim356's Avatar
Reputable Member
Join Date: Nov 2003
Location: Australia
Age: 26
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Re: php sessions

Yep, just rename the session you're using to something unique, the session ['user'] is being used on your server/domain already.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Nov 8th, 2005, 15:56
New Member
Join Date: Nov 2005
Age: 19
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: php sessions

even when i used session_name('frag'); it didn't help, lol
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Nov 8th, 2005, 20:43
Tim356's Avatar
Reputable Member
Join Date: Nov 2003
Location: Australia
Age: 26
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Re: php sessions

Hmm, strange. But it has something to do with sessions, as your script works fine on my server, I see the name 'admin'.

Have you got some other sort of login system that you're using? If so, try destroying those sessions (logging out) and logging in with your tutorial site.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
php, sessions

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Little help on sessions? ktsirig PHP Forum 0 Mar 2nd, 2006 22:12
Sessions djme PHP Forum 4 Feb 25th, 2006 12:10
xsl, php sessions (please help) marco_van_mayo Other Programming Languages 0 Feb 19th, 2006 14:35
PHP Sessions benbacardi PHP Forum 5 Aug 28th, 2005 09:29
Sessions vor ASP.NET Forum 3 Aug 19th, 2003 20:10


All times are GMT. The time now is 16:13.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42