Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Session_start failing because lack of permissions

Tags:

php

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();
....
>
like image 701
Tiago Avatar asked Oct 04 '11 16:10

Tiago


1 Answers

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

like image 150
VanRucPr Avatar answered Nov 19 '22 11:11

VanRucPr