[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Disable Session Auto Start on Windows Server

Posted on 2007-08-01
6
Medium Priority
?
1,228 Views
Last Modified: 2013-12-13
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.
0
Comment
Question by:bergstrom_davin
  • 3
  • 2
6 Comments
 
LVL 8

Expert Comment

by:_Marcel_
ID: 19612602
I'm not sure if it is possible. Can't you just close the session again?
0
 
LVL 1

Author Comment

by:bergstrom_davin
ID: 19612658
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
 
LVL 8

Accepted Solution

by:
_Marcel_ earned 2000 total points
ID: 19612815
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:bergstrom_davin
ID: 19612945
Thanks for pondering it _Marcel I'll leave it open for a bit longer.
0
 
LVL 1

Expert Comment

by:itsbth
ID: 19613522
Edit php.ini. It is usually located in the same folder as php.exe.
Look for session.auto_start.
0
 
LVL 1

Author Comment

by:bergstrom_davin
ID: 19617081
I won't be able to change it server wide just have permission for my working folder.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month20 days, 8 hours left to enroll

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question