开发者

Session_start failing because lack of permissions

开发者 https://www.devze.com 2023-04-10 08:40 出处:网络
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:

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 "eve开发者_开发百科ryone" 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();
....
>


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


  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.

0

精彩评论

暂无评论...
验证码 换一张
取 消