5

I'm using Windows 7 with an Administrator account. I have Xampp installed at C:\xampp.

I have the same problem that this situation, and I tried:

  • Uncheck "read only" boxes to all files and folders
  • attrib -r -a C:\xampp\tmp /S /D (without the /D gives file not found)
  • Selected "everyone" in security just to make sure.

My xampp and tmp folder are now probably the unsafest folder in my computer, but I still get

Warning: session_start() [function.session-start]: open(\xampp\tmp\sess_1fcpeje5cqaopevmlclif9ejc0, O_RDWR) failed: No such file or directory (2)

Which I think it means that the folder is still not writable. My code is just as

<?php
session_start();
....
>
Community
  • 1
  • 1
Tiago
  • 1,116
  • 5
  • 25
  • 39
  • 3
    `\xampp\…` is not `C:\xampp\…`. Check *session.save\_path*. – Gumbo Oct 04 '11 at 16:22
  • @Gumbo php.ini have that as default configuration. That can't be "wrong". Save path is the same. But I will try. Anyway it works if I change the temp folder in other place, but that's not the solution I'm looking for :) – Tiago Oct 04 '11 at 16:35

2 Answers2

7

Now, you can do follow some step:

  1. Stop apache
  2. Go to php.ini file
  3. press Ctrl + f then type "session.save_path" into Find Watch textbox.
  4. You can set value to your tmp folder. for example : "D:\xampp\tmp".
  5. Now you can re start your apache.

Good luck

Himanshu
  • 31,810
  • 31
  • 111
  • 133
VanRucPr
  • 79
  • 1
  • 2
0
  1. If you're using a 64 bit system, I highly recommend installing wamp 64 bit.
  2. If you want to stick to XAMPP try the following:
    1. use the function ini_set to set the path to the sessions to be saved.
    2. a path that works is c:\windows\temp

If all failed try install your wamp or xamp on d drive or any other drive but c. this will guarantee permission on normal drives.

zachjs
  • 1,738
  • 1
  • 11
  • 22
Saty
  • 1