|
-
May 4th, 2009, 03:02 PM
#1
Thread Starter
Addicted Member
session_start() not working
I have a PHP page where the user is redirected after a successful login. I go, test the login, and I come to the page, which complains that I can't call session_start. Will somebody please provide a solution?
-
May 4th, 2009, 05:28 PM
#2
Re: session_start() not working
Lets see the code and the error. Chances are you are calling session_start() after you've already outputted something to the screen.
-
May 4th, 2009, 06:10 PM
#3
Thread Starter
Addicted Member
Re: session_start() not working
Well, if by "outputted something to the screen" you mean the start of the body tag then I have found a solution. I will check, but in the meantime if you could give me some other possible causes and solutions that would be great. Thanks for your help!
-
May 4th, 2009, 07:48 PM
#4
Re: session_start() not working
I could give you help if you either gave me an error or some code.
99% of the time it is because of the reason I already stated, or because you've already opened the session.
-
May 8th, 2009, 01:12 AM
#5
Lively Member
Re: session_start() not working
Dear kfcSmitty,
1. Delete all the white space before session_start()
2. You can use the Hec editor (Free Hec Editor Neo) to check and delete.
3. Save php page and check.
Hope it can help.
LVD
-
May 11th, 2009, 01:23 AM
#6
Re: session_start() not working
You need to ensure there is not output prior to the session_start. Output includes a anything produced by an echo or print statement and anything outside <?php ?>. It also includes the Beginning of File Marker in Unicode file. Until PHP supports unicode properly, you will have to save all scripts as ASCII.
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
|