PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old November 17th, 2002, 03:36 PM
csxpcm csxpcm is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: London, UK
Posts: 13 csxpcm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old November 18th, 2002, 05:03 AM
phait phait is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: London, UK
Posts: 1 phait User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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..

Reply With Quote
  #3  
Old November 18th, 2002, 01:26 PM
JXL JXL is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Netherlands
Posts: 13 JXL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old November 18th, 2002, 11:49 PM
CHornJr's Avatar
CHornJr CHornJr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: New York City
Posts: 233 CHornJr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 50 m 19 sec
Reputation Power: 6
Send a message via AIM to CHornJr Send a message via MSN to CHornJr Send a message via Yahoo to CHornJr
Question

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:
Warning: Cannot send session cache limiter - headers already sent (output started at /home/virtual/site4/fst/var/www/html/test/class.db.php:30) in /home/virtual/site4/fst/var/www/html/test/class.security.php on line 148


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
Attached Files
File Type: txt class.security.txt (7.5 KB, 374 views)

Reply With Quote
  #5  
Old November 20th, 2002, 12:18 AM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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.

Reply With Quote
  #6  
Old November 20th, 2002, 10:10 PM
CHornJr's Avatar
CHornJr CHornJr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: New York City
Posts: 233 CHornJr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 50 m 19 sec
Reputation Power: 6
Send a message via AIM to CHornJr Send a message via MSN to CHornJr Send a message via Yahoo to CHornJr
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

Reply With Quote
  #7  
Old November 29th, 2002, 08:40 AM
latiszm latiszm is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 3 latiszm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Still problems

I have checked all my paths but I still get the error Couldnt start new session.. Any1 who can help?

//Latis

Reply With Quote
  #8  
Old November 29th, 2002, 05:16 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
JXL
Quote:
on top of ur scripts find $dtlsSecurity->ExtraFieldNames('firstname,lastname'); and replace it with //$dtlsSecurity->ExtraFieldNames('firstname,lastname');


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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Building a members area with PHP - sessions problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway