another noob session login question- sorry

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
imstupid
Forum Commoner
Posts: 84
Joined: Fri Feb 18, 2005 1:24 pm

another noob session login question- sorry

Post by imstupid »

hey everyone. first off, sorry in advance, I know this has been discussed previously and can't seem to find it on the search. it's your basic login session start problem:

1. check database for username/password match
2. if match, start session success
3. if session success exists, display page, if not, redirect to login etc. etc.

This code has worked may times before including today. Earlier today, I could login correctly, but a few hours later, the session doesn't seem to be writing.

First, I tried adding :

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
But I did NOT get the "session could not write to file..." message like I have on previous sites. I didn't get any errors displayed actually.

i've also created a /tmp directory, but don't know what to tell the web host to do. was it write permissions to the /tmp folder, enable session handling, or set the session.save_path=/tmp? Or am I missing something else? And I can't figure out why it worked for about an hour, but then stopped.

Sorry again.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

check the contents of phpinfo() to be sure sessions are enabled and where they are going.
imstupid
Forum Commoner
Posts: 84
Joined: Fri Feb 18, 2005 1:24 pm

Post by imstupid »

yeah sorry.

Session Support: enabled
session.save_path: some "sessiondata" folder

is this the folder I need to tell them to set the permissions on?

thanks
Post Reply