Hiya,

I'm currently trying to create a logon script for my web site, and i'm
having problems with sessions. I've set up the server (httpd-2.0.44)
with php (4.3.0) and switched on sessions.

The sessions are only avalibale via cookies over a secure connection
(i've got session.cookie_secure = true)

In the script i've got:

if ($db->num_rows($query) == 1) {
  $_SESSION['success'] = true;
  $_SESSION['username'] = $_POST['username']
  ...
}

...

if (isset($_SESSION['success']) && $_SESSION['success'] == true) {
  //output welcome message
} else {
  //output logon page
}

Everything seams to be working. If you enter the details, you log on and
all is fine, until you come back to the page again. It asks you to log
on again.

I've checked phpinfo() and $_COOKIES['session'] (session being the name
for the php session) has a value ('83260f6c7261052f2ff377d104871484' the
last time i checked, but nothing for $_SESSION shows up.

The interesting thing comes when I look in the /tmp folder (where all
the session storage files have been placed). There's a load of sess_*
files, including sess_83260f6c7261052f2ff377d104871484, but all of them
are 0 bytes in size - empty.

The directory has 1777 permissions, and is owned by root:root. All of
the files are 0600 and httpd:httpd (the user the web servers running
under):

-rw-------  1 httpd httpd    0 Fed 3 17:26 sess_83260f6c7261052f2ff377d104871484

The settings are avaliable via http://www.djnauk.co.uk/phpinfo.php.

I can't see why the server isn't writing to the files, despite the fact
it's creating them no problem. there's no errors in sys.log (where php
is reporting to at the moment) or in the httpd error fle.

Anyone come accross the problem?

-- 
jonathan wright          [EMAIL PROTECTED] | www.djnauk.co.uk
--
life has no meaning unless we can enjoy what we've been given

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to