|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Building a members area with PHP - sessions problem
hello,
I am having problems with the tutorial "Building a members area with PHP". It appear someone else is also having similar problems too, so I was hoping someone might have some advice. I seem to always get the error: "Couldn't start new session: Go Back " I have checked the login credentials, and these are fine. I've tried to diagnose the problem and it appear that the problem is in "class.security.php", within function "StoreSession". It always returns 'false' suggesting it can't create the session, but I just can't fix the problem. Any help or suggestions would be much appreciated. kind regards - Peter |
|
#2
|
|||
|
|||
|
do you use *nix or windoze?
could be the default path in php.ini not existing... in the case of windoze... or it might be that you don't have permission to write the session file to '/tmp' in *nix. If you have windoze I'd suggest that at first you change the default directory for sessions in your php.ini file to: 'C:\Temp' or the temp directory within the windows directory.. either one should do. If it's *nix then check what user you're running as and make sure that that user has appropriate read / write permissions for the /tmp directory.. |
|
#3
|
|||
|
|||
|
on top of ur scripts find $dtlsSecurity->ExtraFieldNames('firstname,lastname'); and replace it with //$dtlsSecurity->ExtraFieldNames('firstname,lastname');
i had the same prob as u and when i changed that the script worked fine and sessions were created normally ![]() |
|
#4
|
||||
|
||||
|
I fixed it differently. I added to my sessions table the field for firstname and lastname.
Of course when I took a look inside my table there was no information inputted except id and sessionid (came out in jibberish in PHPMyAdmin, I'm just presuming it is some sort of encryption built in that I seemed to have missed and/or forgotten about) and the auth and useridfields which ar eboth listed as 0 which is the default value. How come? now this question is posted for Ben AM I suppsoe to do that or is the script suppose to create teh columns for the table? now on to my next problem, on the index.php I am getting the follwoign error Quote:
I have not a clue as to what is wrong and it is coming up onboth the one I copied rom teh artical and from the support file version (atleast they are exactly the same) Joey |
|
#5
|
|||
|
|||
|
CHornJr,
So your using the support material and its still causing that error??? your server must have the header data set up differently to mine on the page thats causing the error add ob_start(); to the first line, to buffer the header. |
|
#6
|
||||
|
||||
|
Thank you, now it is all workign correctly.
Also a quick note, on the index page, the registration link is to register.php when it should be registration.php (or change registration.php to register.php, DOesn'y mtter). ANyone should be bale ot fix a simple html error like that without a problem, but it took me a few minutes to realize cuase i thought I screwed up somethign int he script. Joey |
|
#7
|
|||
|
|||
|
Still problems
I have checked all my paths but I still get the error Couldnt start new session.. Any1 who can help?
//Latis |
|
#8
|
|||
|
|||
|
JXL
Quote:
This was actually my fault. When you created the database, i forgot to add the extra fields, firstname and lastname to the session database. however ive now fix this problem up. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Building a members area with PHP - sessions problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|