Disable Session Auto Start on Windows Server

Is there a way to disable session auto start for a folder on a windows server?

I know you can do it with a .htaccess file on a apache server
php_value session.auto_start 0

Thanks in advance.
LVL 1
bergstrom_davinAsked:
Who is Participating?
 
_Marcel_Commented:
Ah ... having problems with incomplete classes eh?
I remember having a same kind of problem. It was choosing between de session_write_close() or using a php script with auto prepend and store the logic of starting the session or not in there (with no session.auto_start of course. I don't think there is an alternative for IIS for using a .htaccess.
0
 
_Marcel_Commented:
I'm not sure if it is possible. Can't you just close the session again?
0
 
bergstrom_davinAuthor Commented:
Yes I can and have tested the following.

session_write_close ();
// class includes
session_start ();

I don't mind having to do this. I just would like to avoid unserializing twice.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
bergstrom_davinAuthor Commented:
Thanks for pondering it _Marcel I'll leave it open for a bit longer.
0
 
itsbthCommented:
Edit php.ini. It is usually located in the same folder as php.exe.
Look for session.auto_start.
0
 
bergstrom_davinAuthor Commented:
I won't be able to change it server wide just have permission for my working folder.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.