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()?
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.
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();
}
If a session is already started. Then you will get an E_NOTICE error. session_start()
docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With