|
-
Sep 13th, 2007, 10:26 PM
#1
Thread Starter
Lively Member
PHP Problem: User won't stay logged in.
On my member system located at: http://lukeidiot.com/vip
It will let you login and it say's "Thanks for logging in: 'Username'."
But when you try to goto the "Control Panel" it says "You need to be logged
in to do this.
Now I know this isn't an error in the coding of the script because the previous
php member script I used did the same thing. Any idea on why this is happening?
Thanks Futurely.
-
Sep 13th, 2007, 11:01 PM
#2
Re: PHP Problem: User won't stay logged in.
do you have session_start() on the top of the page?
My usual boring signature: Something
-
Sep 14th, 2007, 01:39 PM
#3
Thread Starter
Lively Member
Re: PHP Problem: User won't stay logged in.
 Originally Posted by dclamp
do you have session_start() on the top of the page?
Yeah, it says "ob_start();" which i believe means the same as "session_start();".
I get this error in my sites Cpanel's "Error Log":
Code:
[Fri Sep 14 13:37:23 2007] [error] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/wwwluke/public_html/vip/index.php:4) in /home/wwwluke/public_html/vip/members.php on line 144
-
Sep 14th, 2007, 04:28 PM
#4
Re: PHP Problem: User won't stay logged in.
no. ob_start starts output buffering. You need session_start which will start the session.
My usual boring signature: Something
-
Sep 15th, 2007, 07:52 PM
#5
Stuck in the 80s
Re: PHP Problem: User won't stay logged in.
It would help to see your code in order to debug it. It sounds like you are not properly setting your session or cookie variables (depending on what method you are using).
Can you post the same code that sets up these variables?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|