Главная | Контакты

Главная > Программирование > PHP

How to Enable or Disable Session Auto Start in PHP

Session support is enabled in PHP by default also configure manually to be set disabled or enabled.

How to Enable:

Open your PHP configuration php.ini file and find the word  "session.auto_start" and be ensure the config set to "On"


Also can be set in .htaccess file and add below line,

php_value session.auto_start 1
session.name = session

How to Disable:

You can easily turn it off session in PHP in few lines code,

Open a php.ini file and check the below line,


session.auto_start = "0"

Another option is open a .htaccess file and add below line

php_value session.auto_start 0 
session.name = session

If you have specific user with different path in apache server also add below line,

suPHP_ConfigPath /home/username/public_html

Материал взят с сайта: http://thelinuxfaq.com/268-how-to-enable-or-disable-session-auto-start-in-php

Главная > Программирование > PHP