PDA

View Full Version : PHP4 Session prob


disco
11-18-2002, 04:14 PM
Hi,

I'm relatively new to php and have got a bit of a prob with some session stuff I'm trying to implement.

I've got a login html page that calls a php script called authentication.php.

The first thing this script does is session_start(); on line 2 before doing the rest of the stuff e.g. verifying username and pass exist in db. When they're found to be successful I then register the session as the username.

However, when I test the script on my Win 98 pc I get the following error:

Warning: open(C:\PHP\sessiondata\sess_d0ff6f7919ed63862f3f1226d6c3cf17, O_RDWR) failed: m (2) in c:\program files\apache group\apache\htdocs\authenticate.php on line 2

Does anyone know what this is all about?

Any help will be much appreciated.

Cheers.

bcarl314
11-18-2002, 05:21 PM
Check to make sure the directory c:\PHP\sessiondata exists. If it doesn't, create it. That could be the problem.

disco
11-18-2002, 08:06 PM
Cheers for the suggestion, but the directory's there and spelled correctly etc.

That doesn't seem to be the prob....

disco
11-19-2002, 01:52 AM
It's alright - everyone stop panicking.

You were right and I was thick.

The directory path in the php.ini file needed to be changed from PHP/sessiondata to PHP4/sessiondata (strangely enough it wouldn't work if I just changed the directory name to PHP).

Anyway, thanx a lot.