Jump to content

Recommended Posts

I've googled this until my brain turned to mush.

 

This is the error im getting when I call the session_start() function.

 

Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(C:\Windows\TEMP\) is not within the allowed path(s):

 

I'm on IIS7......

 

Thanks for the help!!! Im braindead now.

 

Paul

change the session directory

with

session_save_path

 

but remember to put that above every script that will use sessions, or you could set teh save path directly in the php.ini which is session.save_path you set that to somewhere where you DO have access to..

 

u could do that until someone here like daniel comes and gives you a better way, or solution without having to change the path, but I'm more than sure eventually you'll be editing some sort of configuration file

Either something else is wrong or Im not doing this right...

 

above my session start I pointed to a specific folder I created on the site

save_session_path('/session_save/');

 

and it gave me the same error.

 

also, when I run php_info for the value open_basedir it shows the server path to this website.  I've seen other servers that just show this as  "no value".  In the php.ini file the open_basedir line is commented out.

 

Thanks!

Paul

Well...that worked! It made me realize that for some reason I had problems with a relative path.  So when I put in the absolute server path it worked fine.

 

Thank you so much Russell for this fix.  Still frustrating as to why it's not working "out of the box".

 

Paul

  • 3 weeks later...

This issue has reared its head again.

 

What in the php.ini / overall configuration do I need to check in order to make this function correctly?

 

open_basedir is commented out in the php.ini file and safe mode is not enabled.

 

Thanks!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.