tags:

views:

587

answers:

1

I'm trying to start the session in a header page in my webiste. But it seems there might be some sort of bug because it fails with the following error:

Warning: session_start() [function.session-start]: open(\xampp\tmp\sess_a7430aab4dd08d5fc0d511f781f41fe5, O_RDWR) failed: No such file or directory (2) in D:\Development\PHP\tt\Include\header.php on line 3

I'm using the default settings for xampp, everything is straight out of the box. For some reason its failing to open the file. however when i go to the directory with the session files in it, the files are there, they are just empty. Is this a bug? or am I doing something wrong?

php version 5.2.8

+10  A: 

This means that you don't have the correct permissions to either read or write the files in the temp directory.

If you on linux then do this

sudo chmod -R 755 \xampp\tmp //or should it be 775

On windows do this as an administrator

attrib -r -a C:\xampp\tmp /S
Unkwntech
It was giving me a file not found error, so I added /D at the end and it went through. Unfortunately this didn't solve the problem
The.Anti.9
If I right click on the folder and go to properties, read only is checked. But if I uncheck it, hit apply, and then right click and go back to properties, its checked again.
The.Anti.9
Than you probably don't have the proper privelages to change the permissions.
Unkwntech
I'm logged in as administrator. I solved the problem by changing the directory it uses in php.ini
The.Anti.9