tags:

views:

485

answers:

3

I have two projects in the same server, their settings conflict in the "session.auto_start", related post. Can I have the session.auto_start "ON" despite the other project contains codes such as session_start()?

+1  A: 

If a session is already started. Then you will get an E_NOTICE error. session_start() docs.

Ólafur Waage
+1  A: 

Do you need to independent sessions per user? I imagine you could just have one script check if a session already exists, like:

if(!($_SESSION)) {
    session_start();
}
Anthony
+1  A: 

If you're using apache, and have the right Options, you can enable session.auto_start with a .htaccess file containing this line: php_flag session.auto_start 1

Or you might be able to put it in your global apache config in that tag.

JasonWoof