Tiago
Tiago

Reputation: 1116

Session_start failing because lack of permissions

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:

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();
....
>

Upvotes: 5

Views: 9417

Answers (2)

VanRucPr
VanRucPr

Reputation: 79

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

Upvotes: 7

Saty
Saty

Reputation: 1

  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.

Upvotes: 0

Related Questions